Lukas Smith wrote:
FYI: SingletonFactory can be a pure static class.
yes it just doesnt work if you normally already use a factory ..because then you cant do $name::factory();
call_user_func(array($name,"Factory")); ??
that works if you store the class name for every child of the parent class into a static property.
the problem is that unless you copy paste, maintain the class name in a static property for every child class you have a problem. both options seem to be rather clumsy and un-OOP. so it would be nice to have some way of getting the class name that is being called upon statically.
regards, Lukas
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php