Hello PHP people,
Was wondering if PHP5 had some sort of "nested class" functionality.
I'm trying to figure out how to return an object (with a private
constructor) that has access to variables in another class.
Something like:
$obj = $factory->getObject("123 4");
Where getObject() is the ONLY way to get an instance of $obj.
$obj has access to private data from the $factory object.
Kind of like inner and anonymous classes in java I guess.
Any approach to doing this in PHP5?
Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX
Was wondering if PHP5 had some sort of "nested class" functionality.
I'm trying to figure out how to return an object (with a private
constructor) that has access to variables in another class.
Something like:
$obj = $factory->getObject("123 4");
Where getObject() is the ONLY way to get an instance of $obj.
$obj has access to private data from the $factory object.
Kind of like inner and anonymous classes in java I guess.
Any approach to doing this in PHP5?
Jamie
--
http://www.geniegate.com Custom web programming
User Management Solutions Perl / PHP / Java / UNIX
Comment