Re: Package proposal: Unique
| From: | cagrET | Date: | Wed, 25 Jun 2003 17:48:56 +0000 |
| Subject: | Re: Package proposal: Unique | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-17718@lists.php.net to get a copy of this message | ||
> 1) factory() is not called in "example";
yeah, you found a bug :)
> 2) it won't contain any object, 'cause the reference to 'static $instance'
is
> *never* accessed/assigned to in factory().
are you sure ? :)
[php]
function &factory($options)
{
$this->Db =& Db::instance();
....
}
[/php]
> The whole [non-working] 'factory' and 'instance' stuff looks like a
> "me
too"
> implementation of design patterns without bothering to understand them.
yeah im newbie, maybe could u tell me how to use them ?
do u have any links to description of factory / instance patterns ?
> > this is not PEAR's DB class
> > http://scg.milc.com.pl/cagret/mgcLib/Db/
>
> Wow! Yet Another Database "Abstraction" Layer For PHP! :]
look at the benchmarks, thats why i wrote it : )
it has dedbugging queries / error handling features that fit my needs,
what is wrong with that ?
> The idea is good, I used this approach several years ago, but the [attempt
at]
> implementation kinda sux.
okay so could u explain me, how this should be done ?
thx for help
--
cagrET