« Bravo, Vodafone!Zufall »

Symfony: get rid of sfOutputEscaperArrayDecorator

06.09.10

Permalink 03:36:22 pm, by ff Email , 72 words   English (US) latin1
Categories: Computer, Internet

Symfony: get rid of sfOutputEscaperArrayDecorator

In a view I tried to render an Array which of course gets wrapped into an sfOutputEscaperArrayDecorator. So the following would not work, since the array became an object:
if (array_key_exists($cell->getCoordinate(), $bildArr)) {

In order to achieve the same thing one can use offsetExists() which can be called on the object instance:
if ($bildArr->offsetExists($cell->getCoordinate())) {

Apart from that the object can be used like a normal array.

No feedback yet

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
Mai 2012
Mo Di Mi Do Fr Sa So
 << <   > >>
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      

Suche

multiblog