Which class and attribute? If its a symfony class there is probably a
getter/setter method for it and then that would be the best way.

Simple reason why getter/setter methods are better than direct access
is that you can then alter the way that variable is returned later
(maybe you add additional escaping or bundle it into an array ... who
knows?) and therefore your code is much more extensible and
maintainable.

On Fri, Jan 29, 2010 at 12:16 PM, ruigoncalves <[email protected]> wrote:
> Hi there!
>
> How can I access the attributes of a class? By the name of the
> attribute or I have to use the appropriate getter/setter?
>
> Thanks in advance,
> Best regards!
>
> --
> 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.
>
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
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