> Thanks for the replies :)
> Surely if I pass it as a parameter to the __construct then I would have to
> make an instance of the otherObject, notice that messwithotherthings is
> Also, if I'm not using OOP properly, Eddie, how would I use it properly to
> prevent this situation?
Hmmm, I didn't notice the method was static - that means my idea really won't
I did have a bad feeling about this, and Eddie confirmed my unease with the
point about OOP.
Really, you should need your $firstobject to be a singleton:
private static $theInstance = NULL;
protected function __construct()
public static function getInstance()
self::$theInstance = new FirstObject();
// ... other methods ...
static function messWithOtherThings()
$firstObject = FirstObject::getInstance();
I think that works, and is reasonable to the OOP purists...
Peter Ford phone: 01580 893333
Developer fax: 01580 893399
Justcroft International Ltd., Staplehurst, Kent
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php