[TYPO3-ect] method setKeyPathOfRules disappeared

Fabien Udriot fudriot at omic.ch
Tue Sep 11 22:52:30 CEST 2007


In the bananas extension, you transformed all the PHP code from the 
controller in Typoscript in the setup.txt. The result is an empty 
controller in bananas and a long setup.txt

What is the benefit to handle this way ? I am thinking about and I don't 
see :

- for each modifications in the setup.txt, you have to clear the cache
- no debug message if errors (or only a few)
- no particularly clear to code the extension like this (at least for me)
- what about speed ?


Fabien Udriot a écrit :
> I am searching why :
>  > $pipe->setProperty('validationRules.', 'myOtherValidationRules.');
> 
> Warning: preg_match() [function.preg-match]: Delimiter must not be 
> alphanumeric or backslash in 
> (...)typo3conf/ext/lib/class.tx_lib_validator.php on line 88
> 
> Warning: array_merge() [function.array-merge]: Argument #2 is not an 
> array in (...)typo3conf/ext/lib/class.tx_lib_validator.php on line 89
> 
> 
> Elmar Hinz a écrit :
>> Fabien Udriot wrote:
>>
>>> Hi,
>>>
>>> Recently, I have updated my working copy of lib and I have noticed that
>>> the method setKeyPathOfRules() from tx_lib_validator disappeared.
>>>
>>> I now missed this functionnality. I have different input to validate
>>> according to different parameters input... but how can I do that now ?
>>>
>>> If I believe the code, the rules have to be called "validationRules" in
>>> the TypoScript. (line 87 of file class.tx_lib_validator.php).
>>>
>>> Can we change the implementation with a property :
>>>
>>> Instead of this line 87 :
>>> foreach((array) $this->findProperty('validationRules.') as $rule) {
>>>
>>> rather this :
>>> foreach((array) $this->findProperty($this->validationRules) as $rule) {
>>>
>>> _addition method in tx_lib_validator :_
>>>
>>> public function setValidationRules($key){
>>> $this->validationRules = $key;
>>> }
>>>
>>> best regards,
>>>
>>> Fabien
>>
>>
>>
>> Hi Fabien,
>>
>> thank you for testing the recent version of T3-POP.
>>
>> You want to use a different key from 'validationRules.'? I have 
>> provided a
>> general approach to remap setup keys. See the note here:
>> http://wiki.typo3.org/index.php/Action_Pipeline#Local_Object_Property
>>
>> Your case:
>> $pipe->setProperty('validationRules.', 'myOtherValidationRules.');
>>
>> Would the fit your needs?
>>
>> Then please test, if theory fits praxis and give feedback to this 
>> posting.
>>
>> Regards
>>
>> Elmar
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> TYPO3-team-extension-coordination mailing list
>> TYPO3-team-extension-coordination at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-team-extension-coordination 
>>
>>
>>
>>
> 


More information about the TYPO3-team-extension-coordination mailing list