Re: Using Static Class Variables to Access Globally

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Nathan Nobbe wrote:
in many cases, people like to drive client code through methods, which,
given the current set of language features in php, could be reason to favor
a singleton w/ __get() & __set() methods defined.  you still have the same
'global' scope, except that the data doesnt have to be public.  (im not
saying its bad to use public vars, im merely presenting an alternative
perspective).

supposedly php has in the rfc about static classes to add __setStatic() &
__getStatic(), but support isnt there yet, and im starting to doubt it will
be available for 5.3 =/

-nathan


Interesting point about the singleton option. I'll have to think about that one.

I can assure you that __set/getStatic() will not make it in 5.3. I've already contacted the author of that RFC, they confirmed it won't make it. :( I'm just glad late static binding made it.

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux