Re: Q on class failure...
| From: | jsWalter | Date: | Mon, 22 Sep 2003 17:25:50 +0000 |
| Subject: | Re: Q on class failure... | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-163509@lists.php.net to get a copy of this message | ||
"Raditha Dissanayake" <jabber@raditha.com> wrote in message
news:3F6E82E8.1090603@raditha.com...
> hi,
>
> It's generaly considered that constructors are supposed return an
> instance of that class. Use a factory instead if you want to return nulls;
A Factory?
OK, I'll look that up, do some readng and try that route.
So, if I understand you, using this 'factory' I can either return a new
class instance (if it passes all the tests) or a NULL value (no instance) if
it fails?
Thanks for the pointer.
Walter