Re: Rethink CS for require_once?

From: Date: Fri, 03 Dec 2004 08:04:50 +0000
Subject: Re: Rethink CS for require_once?
References: 1 2 3 4 5 6 7  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34744@lists.php.net to get a copy of this message
Greg Beaver wrote:
Lukas Smith wrote:
maybe I still dont get it but what if a package requires DB and the users code also requires DB. So the users does: require 'foo/bar/DB.php';
No, the user would do require_once 'DB.php';
then he does: require 'foo/lala/DB/NestedSet.php';
and require_once 'DB/NestedSet.php';
NestedSet will also load DB.php but relative to the foo/lala path. So again unless we do a class_exists() before any call inside PEAR that loads another class we hit a brick wall. Actually even worse DB.php is a public file so NestedSet should not use dirname(__FILE__) according to your argument!(?)
Ok now I dont get your proposal. I dont see what you are really solving here. You are trying to solve misconfigured include paths by killing the power of include paths? regards, Lukas

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