[TYPO3-mvc] [!!!] FYI: Breaking changes in recent commit of Extbase

Martin Kutschker masi-no at spam-typo3.org
Mon Mar 8 20:39:02 CET 2010


Jochen Rau schrieb:
> Hi (again ;-)).
> 
> On 08.03.10 19:03, Thomas "Thasmo" Deinhamer wrote:
>> Another question about this:
>>
>> "[+FEATURE] Extbase (Persistence): Implemented Query::implodeAnd(array)
>> and Query::implodeOr(array). Please give Feedback on this Feature. This
>> is not yet part of the API! Related to #6735."
>>
>> Wouldn't it be better to allow providing the array of constraints
>> directly to logicalAnd() and logicalOr() instead of some sort of
>> imploding mechanism? Or did I miss something?

 have the same feeling. As logicalAnd() already does "magic" with its arguments it won't hurt IMHO
to have to possible variations:

$query->logicalAnd(array/Iterator $constraints)
$query->logicalAnd($constraint1, ..., $constraintN);

> I really like to have method arguments to be as explicit as possible, like
> 
> $query->logicalAnd($constraint1, $constraint2);
> 
> And
> 
> $constraints = array($constraint1, $constraint2);
> $query->implodeAnd($constraints);
> 
> seems to be very natural (at least to me ;-)), because
> implodeAnd($constraints) has the same semantics as implode(' AND ',
> $constraints).

"implode" has a resemblance to implode(), but the name is only funny, but not "intention revealing".

If you (or the v5 team) don't want to have a method with a dual signature (what was the term for
this, drats, I've been away too long from the university) then I suggest to use another name.

But of course I do welcome the feature!

Masi


More information about the TYPO3-project-typo3v4mvc mailing list