On Jul 4, 2008, at 8:54 AM, Tamcy wrote:
>
>
> On Jul 3, 8:27 pm, Fabien Potencier <[EMAIL PROTECTED]
> project.com> wrote:
>>
>> What about:
>>
>> <?php $url = sfHelper::get('url') ?>
>>
>> or
>>
>> <?php $url = get_helper('url') ?>
>>
>> or better
>>
>> <?php $url = $helper->get('url') ?>
>>
>> And a configuration file where you define the binding between
>> 'url' and
>> a class
>>
>> url: sfUrlHelper
>>
>> The $helper->get() has the advantage to be able to change the $helper
>> base class and to keep in this base class some common objects
>> (sfRouting, ...)
>>
>> Fabien
>>
>
> To elaborate further...
>
> $url = $helper->get('url');
I am really opposed to this syntax given that it does not allow for
code hinting in most IDE's. To me that is a big hit for the framework...
Or am I wrong?
Marijn
> $javascript = $helper->get('javascript');
>
> $helper->extract(); // import registered helpers to current scope,
> just like extract() for arrays.
>
> Handy for people who are more comfortable with $url instead of
> $helper['url'].
>
> Tamcy
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---