[TYPO3-50-general] RFC: Arguments with identifiers

Robert Lemke robert at typo3.org
Thu Jan 8 14:23:25 CET 2009


Hi Sebastian,

Am 08.01.2009 um 10:10 schrieb Sebastian Kurfürst:

> So, the updateAction would look as follows:
>
> // an argument "customer" of the type "F3\Example\Domain\Customer" was
> registered
> public function updateAction() {
> 	$customer = $this->arguments['customer']->getValue();
> 	$customerIdentifier = // GET IDENTIFIER
> 	$persistentCustomer = $this->customerRepository-
>> findByIdentifier($customerIdentifier);
> 	$this->propertyMapper->map($customer, $persistentCustomer);
> }
>
> The problem is how the // GET IDENTIFIER is done.
>
> Proposed solution:
> I'd like to make the "Argument" object aware of an identifier.
> Thus, in the above example, you would write $this-
>> arguments['customer']->getIdentifier() instead of // GET IDENTIFIER.

yes, that's how I proposed it in our discussion, right?

>> However, internally, it is not clean if the "Argument" object  
>> directly
> checks for the "identifier" array property.
> That's why I'd like to add a new method to PropertyConverters which is
> called "getIdentifier()" - resolving the above identifier.
> As not all PropertyConverters need such a method, I'd encapsulate this
> in a new interface. (Property\Converter\IdentifierFacetInterface or  
> so)

Let's call it Property\Converter\IdentifierAwareInterface.

Anyway, in practice that means that most developers don't have to care
about this because they will use the standard  
DomainObjectPropertyConverter,
correct?

If so, +1

robert


More information about the TYPO3-project-5_0-general mailing list