On 11.07.2011, at 14:29, Mathias Verraes wrote:

> Hello {{ params[0] }} is not just ugly, it's also brittle: if for some reason 
> I change the order in which I assign params to the view, it will break the 
> template. 
> Hello {{ name }} won't have that problem. 

I think there was some loss of context here.

What I was discussing was the situation that one needs to ensure that only 
assoc arrays are legitimate parameters for rendering, which to me is ugly. I 
think it makes sense to be able to just pass in an order array or a scalar 
string or an object etc.

So the question was if:

->render($tpl, array('foo', 'bar'));

should just work as if one would have done

->render($tpl, array(array('parms' => ('foo', 'bar')));

and consequently if:

->render($tpl, 'foo');

should just work as if one would have done

->render($tpl, array(array('parms' => 'foo'));

regards,
Lukas Kahwe Smith
m...@pooteeweet.org



-- 
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 symfony-devs@googlegroups.com
To unsubscribe from this group, send email to
symfony-devs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to