Hi,

I believe this is a legacy from the symfony 1.0 days when this was the
standard way to do things. Unless you're using some of the default
symfony helpers that are still set up that way, you can of course
simply write classes for helpers. This is what I usually do. This also
saves you from calling the use_helper() function, because classes are
autoloaded.

It can be argued that the seperate methods are easier to read within
views (since views are supposed to be very light on PHP) however I
don't think that adding a namespace (classname) before helper
functions will make a view harder to read.

Stefan

On Mon, Sep 7, 2009 at 3:20 AM, Jake Barnes<[email protected]> wrote:
>
>
> I am confused. In most respects Symfony presents itself an OOP
> framework which implements several best-practice   design patterns,
> such as MVC and Front Controller, and Symfony takes advantage of some
> of the most advanced aspects of PHP 5. On the symfony-project.org
> site, the first headline of body text says:
>
> "Symfony is a full-stack framework, a library of cohesive classes
> written in PHP."
>
> I note the use of "cohesive classes".
>
> So I am puzzled: why are helpers implemented as functions, instead of
> as methods of classes? The use of functions seems incongruous with the
> stated aims of Symfony. It seems clunky to have such an advanced
> framework that falls back to functions for some things.
>
> Does anyone know why this particular decision was made?
>
>
>
>
>
>
>
> >
>



-- 
Stefan Koopmanschap
Symfony Community Manager
[email protected]

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to