Making a object from one class available to all objects in the calling class

From: Date: Mon, 05 Feb 2001 14:52:29 +0000
Subject: Making a object from one class available to all objects in the calling class
Groups: php.general 
Request: Send a blank email to php-general+get-38240@lists.php.net to get a copy of this message
Hi, Can someone advise on the following. class class_y { function test() { return "test"; } } class class_x { function x { $n = new $y; } function z { $n->test(); } } I need the object of class_y available to the other objects of classx but I cant figure out how I do this. Any ideas? Regards, Steve Maher

« previous php.general (#38240) next »