Hey Guys,

I can see some advantages besides the namespacing. Let's just say  
that all the helpers inherit their functionality from the library.  
Becase of the oop nature  those helper functions are easily  
overwritten without _losing_ the original functionality. E.g.

<?php

BaseUrlHelper
{

   public function urlFor ($loc)
   {
     //blah blah...
   }

}

MyUrlHelper extends BaseUrlHelper {

   public function urlFor ($loc)
   {
     // do something domain specific before the normal urlFor  
function....
     parent::urlFor();
   }

}

That seems like a big advantage to me..

Greetings,

Marijn

On Jul 2, 2008, at 6:27 PM, Nicolas Perriault wrote:

>
> On Wed, Jul 2, 2008 at 3:08 PM, Jacob Coby <[EMAIL PROTECTED]>  
> wrote:
>
>> Besides, what makes $h['url']->url_for() better than url_for()?
>> Namespacing?  That can be done by adding your namespace before the
>> function name - my_url_for().  It just seems like a whole lot of
>> typing for really common functions for not much benefit.
>
> I agree, I can't really see any added value but a more complex syntax
> here. Tristan, have you got a concrete example of where it could help
> (besides namespaces) ?
>
> ++
>
> -- 
> Nicolas Perriault
> http://prendreuncafe.com - http://symfonians.net - http:// 
> sensiolabs.com
> Phone: +33 660 92 08 76
>
> >


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to