Re: PEAR2 standards: anything good at all?

From: Date: Mon, 16 Jul 2007 16:41:43 +0000
Subject: Re: PEAR2 standards: anything good at all?
References: 1 2 3 4 5 6 7 8 9 10 11 12  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-47531@lists.php.net to get a copy of this message
Lukas Kahwe Smith wrote: > Philippe Jausions wrote: > >> Given the above, how do we implement factory() methods in PEAR2 >> packages, especially in the cases of fallback drivers and/or optional >> dependencies? > > This is a valid concern (finally someone that brings up a valid concern > in a well explained manner). I guess first you check if the class exists > without triggering autoload, then you could call our class loader > method, which returns false if its failed and you can then throw an > Exception. > > regards, > Lukas Sample implementation: http://pear.11abacus.com/dev/PEAR2_Benchmark/PEAR2/Load.phps -Philippe

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