Hi. It seems to me that your error is here: > I have the following files in my library path: > site/library/SomeDir1/Foo.php > site/library/SomeDir2/Bar.php
Which should, IMO, be: site/library/MyLib/SomeDir1/Foo.php site/library/MyLib/SomeDir2/Bar.php Since your classes are named MyLib_SomeDir1_Foo and MyLib_SomeDir2_Bar. Regards, Narinder. -- ______________________________________________________ | Narinder Chandi, Director, | ToolBox Systems Limited, Surrey, England, UK. | tel : +44 (0)1372 720117, mob : +44 (0)7973 512495 | www : http://www.toolbox.uk.com | Skype : NarinderChandi | LinkedIn : http://www.linkedin.com/in/toolboxsystems | Twitter : @ToolBoxSystems |______________________________________________________ | Consultancy * Development * Support |______________________________________________________ on 23/04/2010 13:28, tonystamp at [email protected] wrote: > > Hi, > > I have the following (standard) directory structure: > > site/application (contains models, forms, view directories etc) > site/library > site/library/Zend > site/library/MyLib > > ..configured in my application.ini as: > includePaths.library = APPLICATION_PATH "/../library" > autoloaderNamespaces[] = "MyLib_" > > I have the following files in my library path: > site/library/SomeDir1/Foo.php > site/library/SomeDir2/Bar.php > > Now the following is throwing a class not found error: > > class MyLib_SomeDir1_Foo > { > protected $bar; > > public function __construct(){ > $this->bar = new MyLib_SomeDir2_Bar(); > } > } > > > The namespace autoload works fine to load the initial class (Foo), yet when > it's within the library folder it doesn't seem to be able to find class Bar. > What am i doing wrong?
