addPrefix in Autoloader

Showing 1-1 of 1 messages
addPrefix in Autoloader Hari K T 12/22/11 6:01 PM
Hi Guys, 

A doubt / concern regarding naming .

$loader->addPrefix('Vendor\Package\\', dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src');

Normally when you hear about Prefix it means this will add before this.

So I wonder whether the directory path should also contain the Vendor\Package if namespace given is like that .

$loader->addPrefix('Vendor\Package\\', dirname(__DIR__) . DIRECTORY_SEPARATOR . 'src/Vendor/Package');

Any other thoughts guys ?

Hari K T
M: +91-9388758821 | W: http://harikt.com/blog