Re: [Fwd: Re: PEAR framework changes for PHP5]
| From: | Lukas Smith | Date: | Sat, 31 Jan 2004 11:11:14 +0000 |
| Subject: | Re: [Fwd: Re: PEAR framework changes for PHP5] | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-25365@lists.php.net to get a copy of this message | ||
Hans Lellelid wrote:
Jon Parise wrote:On Wed, Jan 28, 2004 at 11:59:03PM +0100, Tobias Schlitt wrote:
On a related note, I believe PEAR tools would get far more use if they could integrate more easily into other applications. One thing that I think would facilitate this greatly is having a class path convention. I should be able to write (e.g.) my own Log container or MDB driver and specify a full path to that class when using the Log::factory(), MDB::factory() method, etc. My web application does not live in /usr/local/lib/php, and I don't want my container files to have to be copied there so they can be found by the factory method. One solution would be passing the actual path to the file (assumes 1-class per file); a better (IMO) solution might be to have an [optional] array convention -- e.g. array('filepath', 'classname'). I like the array idea because it's kinda like what PHP does for specifying a method to be invoked (e.g. by call_user_func). I've used dot-notation (classpath.relative.to.include.ClassName) for many of my tools because it provides at least a layer of abstraction between filesystem and classname, but that isn't ideal either and wouldn't work for PEAR where filenames and classnames do not match.hmm I dont understand the issue .. just add the paths to your include_path using ini_set or even set_include_path regards, Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07