On 23 April 2010 18:10, Ashley Sheridan <a...@ashleysheridan.co.uk> wrote:
> I think for now I'll just resort to leaving it as a public variable.
> I'll leave the specific set function for it in and just hope that is
> used instead! As it's only me who'll be using it for the time being, I
> can always yell at myself later if I forget!

You're using a setter but a public variable? That's about the worst
compromise, isn't it? Either go down the road of the public variable
or the setter/getter (and in your case I would definitely recommend
the latter). Also, __get/__set are fine, as long as you don't use them
for everything (i.e. 5 magic calls per request will do very, very
little to your app, whereas 1000 per request will have some
significance on a site with lots of users).


WWW: http://plphp.dk / http://plind.dk
LinkedIn: http://www.linkedin.com/in/plind
Flickr: http://www.flickr.com/photos/fake51
BeWelcome: Fake51
Couchsurfing: Fake51

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to