> <?php $url = $helper->get('url') ?>
>
> And a configuration file where you define the binding between 'url' and
> a class
>
> url: sfUrlHelper

+1 for this approach


Bernhard

On Thu, Jul 3, 2008 at 2:27 PM, Fabien Potencier
<[EMAIL PROTECTED]> wrote:
>
> Tristan Rivoallan wrote:
>> On Thu, Jul 3, 2008 at 11:00 AM, Bernhard Schussek <[EMAIL PROTECTED]> wrote:
>>> I don't like the $h idea. It's complicated to understand for new
>>> developers, the extra squared brackets and quotes add unnecessary
>>> complexity and are prone to errors and last but not least, the array
>>> syntax is totally misused.
>>>
>>> IMO we should opt for the most simple, but most obvious solution: By
>>> simply defining the objects in the template.
>>>
>>> <?php $Url = new sfUrlHelper ?>
>>
>> you are right, this solution is better. There's not much difference between
>>
>>   <?php  load_helper('url') ?>
>>
>> and
>>
>>   <?php  $url = new sfUrlHelper() ?>
>>
>> the only issue i see is that if you override the sfUrlHelper, you have
>> to change the instanciation in every template.
>
> 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
>
>>
>> ++
>> tristan
>>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony developers" group.
To post to this group, send email to symfony-devs@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to