On 11.07.2011 12:35, Lukas Kahwe Smith wrote:
>
> On 11.07.2011, at 12:24, Jordi Boggiano wrote:
>
>> On 08.07.2011 00:14, Lukas Kahwe Smith wrote:
>>> $article = new Article();
>>> $this->templating->render($template, $article);
>>>
>>> would allow for
>>> {{ params.title }}
>>
>> That's alright, although not so common, array('article'=>$article) would
>> be more usual imo.
>
> what do you mean with "usual"?
> the point was that having to manually define the variable name by wrapping
> thing into an assoc array is ugly.
I mean that imo it's not ugly, and most APIs work that way afaik that
they have as the top node an object with one key and then an array, for
example http://develop.github.com/p/repo.html
Having everything called "params" is also ugly imo, but it's especially
confusing and removes the self-documenting aspect of the variable name.
Cheers
--
Jordi Boggiano
@seldaek - http://nelm.io/jordi
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
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