Vlad--thanks for this tip...I believe this is the same advice from the
quickstart. I tried this with the namespace set to '' (so I don't have to
prefix class names with Default_) without success.
Having said this, how does the autoloader get initialized for the Zend
library in my installation? The docs re: autoloader behavior with
Zend_Application is pretty vague...
funkyfly wrote:
>
> Hi,
> It necessary to initiate the module autoloader.
> if you're using Bootstrap class, add the following lines to it:
>
>
> protected function _initAutoload()
> {
>
> $autoloader = new Zend_Application_Module_Autoloader(array(
> 'namespace' => 'YourNamespaceHere_',
> 'basePath' => dirname(__FILE__),
> ));
>
> return $autoloader;
> }
>
> Replace *YourNamespaceHere* with your namespace ;-)
>
> This should work, tell me if it doesn't.
>
> --
> Pagarbiai,
> Vladas Diržys
>
>
> On Thu, Jun 11, 2009 at 22:40, spaceage <[email protected]> wrote:
>
>>
>> I have a new project set up via Zend_Tool...the directory structure is
>> totally standard:
>>
>> /application
>> bootstrap.php
>> /configs
>> /controllers
>> /layouts
>> /models
>> /views
>> /library
>> /public
>> index.php
>>
>> My include_path is set entirely in index.php:
>>
>> set_include_path(implode(PATH_SEPARATOR, array(
>> realpath(APPLICATION_PATH . '/../library'),
>> realpath(APPLICATION_PATH . '/models'),
>> get_include_path(),
>> )));
>>
>> Autoloading for Zend classes is working fine, but I can't autoload my own
>> classes in /application/models.
>>
>> From reading posts here and the docs, I've seen references to the fact
>> the
>> Zend_App create autoloaders for the include paths during bootstrap...but
>> this isn't working for me.
>>
>> What am I doing wrong?
>>
>> TIA,
>> David
>>
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Zend_Application-and-autoloading-tp23987637p23987637.html
>> Sent from the Zend Framework mailing list archive at Nabble.com.
>>
>>
>
>
--
View this message in context:
http://www.nabble.com/Zend_Application-and-autoloading-tp23987637p23989034.html
Sent from the Zend Framework mailing list archive at Nabble.com.