Hello Matthew:

Thank you very much for the reply. That makes sense. I've just tried adding
the path to the models folder inside a specific modules. This seems to be
working. But, it works for any class name other than "Index".

Meaning I have to have a loader like this:

IndexController.php (assume this one is inside module "PRO")

indexAction() {
    Zend_Loader::loadClass('someClass');
    // can's use this one like Zend_Loader::loadClass('Index');
    // even tho i have the path inside the include_path
}

So this'll load the class:

class someClass() {
    // code
}

from

/application/pro/models/comeClass.php

******

I wonder why it can't load and gives me an error when i say "Index". Any
clues ?

Thanks!!!


Matthew Weier O'Phinney-3 wrote:
> 
> -- velanzia <[EMAIL PROTECTED]> wrote
> (on Tuesday, 28 August 2007, 10:00 AM -0700):
>> I've got a question with using modules with ZF. I got a  website which
>> basically has three sections "pro" and "public". So I thought have three
>> different modules like "default", "pro" and "public".
>> 
>> Bootstrap sets the controller directories like this:
>> 
>> 'default' => 'application/default/controllers',
>> 'pro' => 'application/pro/controllers',
>> 'public' => 'application/public/controllers'
>> 
>> And the similar paths to models were added to the include path using the
>> same bootstrap.
>> 
>> However when I try to do this,
>> 
>> indexAction() {
>>      Zend_Loader::loadeClass('Index');
>> }
>> 
>> in my "/application/default/controller/IndexController.php", expecting to
>> load my "Index" model class from this file
>> "/application/default/models/Index.php" I get an error similar to this:
>> 
>> File 'Index.php' loaded but the class 'Index" was not found.
> 
> We don't currently add the 'models' directory from a module to the
> include_path, so this will not work unless you have done so yourself in
> your bootstrap or elsewhere.
> 
> -- 
> Matthew Weier O'Phinney
> PHP Developer            | [EMAIL PROTECTED]
> Zend - The PHP Company   | http://www.zend.com/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Question-about-using-MODULES-tf4342914s16154.html#a12372357
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to