Re: PHP4 static properties - PEAR vs my solution

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

 



On Fri, October 6, 2006 7:22 am, Hodicska Gergely wrote:
> I'm curious about your opinion.

> 	class base
> 	{
> 		function &staticProperty($name, $value = null)
> 		{
> 			static $properties = array();

This would be Really Nifty, if PHP allowed multiple inheritence so you
could have a mixin class...

Otherwise, however, you have to have a common base class across all
the various class systems in use in your multitude of web
applications, or duplicate the code (ugh!) in each.

So if you have a single base class to throw this into, it's great.

If you have a plethora of code-bases you work with, the global
variable hack is probably more suitable.

YMMV

-- 
Some people have a "gift" link here.
Know what I want?
I want you to buy a CD from some starving artist.
http://cdbaby.com/browse/from/lynch
Yeah, I get a buck. So?

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