Singleton Was: [PHP] OO parent/child relationship
| From: | Gerard Samuel | Date: | Mon, 06 Oct 2003 21:35:40 +0000 |
| Subject: | Singleton Was: [PHP] OO parent/child relationship | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165251@lists.php.net to get a copy of this message | ||
Gerard Samuel wrote:
Andy Crain wrote:http://www.trini0.org/index.php This is based on work seen at http://www.phppatterns.com/index.php/article/articleview/75/1/1/ Yes yes, I know. It uses $GLOBALS, (OO Sin). Father forgive me.... From the article, Im getting lost with the reason/meaning/purpose of the instance() method. If anyone can clarify it for me, and let me know if my example would need something like it. So if you care to critique it, feel free, Ill try not to be hurt ;) ThanksThis all seems like a perfect case for the singleton pattern. See http://www.phppatterns.com/index.php/article/articleview/6/1/1/ and http://www.phppatterns.com/index.php/article/articleview/75/1/1/ AndyIm currently trying to wrap the brain around the Singleton Registry article. Wish me luck :)