RE: [PEAR-DEV] general questions

From: Date: Thu, 29 Nov 2001 00:34:22 +0000
Subject: RE: [PEAR-DEV] general questions
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-3163@lists.php.net to get a copy of this message
On Thu, 29 Nov 2001, Lukas Smith wrote: > > > > > But why do stuff like DB::connect ? > > > > > Why not put stuff like that in a constructor? > > > > > > > > Because DB::connect() can return you a correct object type (ie > > mysql/pgsql). > > > > Well an object can do this also. You just require the proper code in the > constructor ... Ulf called this a factory in his speech at the php > conference iirc > DB::connect() is exactly a 'factory' type of function. Am I missing something here ? Joao -- João Prado Maia <jpm@phpbrasil.com> http://phpbrasil.com - php com um jeitinho brasileiro -- Precisando de consultoria em desenvolvimento para a Internet ? Impleo.net - http://impleo.net/?lang=br

« previous php.pear.dev (#3163) next »