Simon Mundy wrote:
>
> Hi Matthew - I have added an element to a form using the 'factory'
> method and set the 'class' attribute by passing options to the method.
> If I inspect the object with var_dump I can see a public property of
> 'class'. But if I try $element->getAttribs() I get an empty array.
>
> $this->addElement('button', 'submit', array(
> 'value' => 'submit',
> 'class' => 'next',
> 'decorators' => array(
> array('ViewHelper', array(
> 'helper' => 'formButtonImage',
> )),
> ),
> ));
>
> var_dump($this->getElement('submit'));
> var_dump($this->getElement('submit')->getAttribs());
>
> I can see that the reflection class has been used to derive all the
> public properties but this seems to be a bit buggy on PHP 5.1.6. Could
> all 'public' attributes not instead be placed into a protected array
> called _attribs instead? It would reduce the need for the overhead of
> the reflector and be somewhat more flexible for people like me who
> can't yet migrate to 5.2.x
>
> Cheers!
>
> --
>
> Simon Mundy | Director | PEPTOLAB
>
> """ " "" """""" "" "" """"""" " "" """"" " """"" " """""" "" "
>
> 202/258 Flinders Lane | Melbourne | Victoria | Australia | 3000
> Voice +61 (0) 3 9654 4324 | Mobile 0438 046 061 | Fax +61 (0) 3 9654
> 4124
> http://www.peptolab.com
>
>
>
I am experiencing the same issue with 5.1.6 on Linux and have tracked the
problem to the this email. Is there a issue ticket for this I can track the
progress?
Ken
--
View this message in context:
http://www.nabble.com/Zend_Form-bug%3A-getAttribs%28%29-doesn%27t-return-set-attributes-tp15105264s16154p15168025.html
Sent from the Zend Framework mailing list archive at Nabble.com.