On 03-11-2010 at 07:46:29 Anton Andriyevskyy <x.meg...@gmail.com> wrote:


Hey, lets add to PHPTAL a way to use standard php callbacks to define custom modifiers.

Currently it is so:


It would be nice to use something like this:

$phptalInstance->setModifier('modifierName', <phpStandardCallback>)

This will allow to better integrate PHPTAL into pure OOP frameworks like
Kohana, CI and others.

Is it only because functions are not OO, or do you actually need to define modifiers with same name, but different implementation, in different parts of same PHP program?

PHPTAL does have "object-oriented" method for defining custom modifiers:

PHPTAL_TalesRegistry::getInstance()->registerPrefix('modifierName', <phpStandardCallback>)

but it doesn't solve any problems over simple function definition, which is why I don't recommend it.

regards, Kornel

PHPTAL mailing list

Reply via email to