tags:

views:

10

answers:

0

i am reading up the doctrine 2 docs about class loading & include_path. but this question maybe relavent to any other PHP framework or class loading

require '/path/to/lib/Doctrine/Common/ClassLoader.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine', '/path/to/Doctrine2/lib');
$classLoader->register(); // register on SPL autoload stack

if i have doctrine added to the php include_path, do i still need line 2 /path/to/Doctrine2/lib? and can i say that include_path is only used for include & require statements? not in ... err i dunno how to explain ... initializing of variables? like ...

new ClassName()

as a simple example if i have Test1.php containing namespaces & classes in the include_path, all i can do is not require or include it? but i still need to autoload namespaces & classes in it?

this maybe a stupid question but i am just confused :(