[Svn] r1344 bugs

till klimpong at gmail.com
Wed Apr 30 16:26:32 CEST 2008

On Wed, Apr 30, 2008 at 4:21 PM, Thomas Bruederli <roundcube at gmail.com> wrote:
> till wrote:
> >
> > >  Here we better use the existing methods and keep those vars protected.
> > >
> >
> > I don't agree, __get()/__set() are used to make some variables - not
> > all - available through $foo->varname.
> >
> > I think rcube_template needs to be adjusted and then it would work.
> >
>  It also works without this magic and without adjusting any other classes.
>  The fact that with PHP5 we now have an access control shows us, where
> scripts try to (illegally) read/write private properties which are not meant
> to be accessed directly.
>  Just changing the access level is the wrong approach. Fixing the script
> that causes the illegal access is the preferred way for me.

That's one way to look at it, I thought the access was needed/wanted,
so instead of a dozen setFoo() and getFoo() methods I implement
__set() and __get().

More information about the Svn mailing list