note 89213 added to language.oop5.patterns

From: Date: Thu, 26 Feb 2009 15:54:32 +0000
Subject: note 89213 added to language.oop5.patterns
Groups: php.notes 
Request: Send a blank email to php-notes+get-151174@lists.php.net to get a copy of this message
vaddsm: that's a nice try if you always use fSingleton to create either fClassOne or fClassTwo. But half a year later, somebody else on your team will look at your code half-heartedly and do a $obj = new fClassOne(); There's nothing that will stop him from doing that. Your solution may be nice to ensure lazy loading, but only (final) private/protected contructors and clone-methods will make it impossible to create a second instance of your class. ---- Server IP: 217.160.72.57 Probable Submitter: 94.220.155.190 ---- Manual Page -- http://www.php.net/manual/en/language.oop5.patterns.php Edit -- https://master.php.net/note/edit/89213 Del: integrated -- https://master.php.net/note/delete/89213/integrated Del: useless -- https://master.php.net/note/delete/89213/useless Del: bad code -- https://master.php.net/note/delete/89213/bad+code Del: spam -- https://master.php.net/note/delete/89213/spam Del: non-english -- https://master.php.net/note/delete/89213/non-english Del: in docs -- https://master.php.net/note/delete/89213/in+docs Del: other reasons-- https://master.php.net/note/delete/89213 Reject -- https://master.php.net/note/reject/89213 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#151174) next »