|
|||
|
hi all
i'm sure theres an easy answer to this but i'm stumped! I've setup my site to use modules as set out on the ZF documentation: Code:
docroot/
index.php
application/
default/
controllers/
IndexController.php
FooController.php
models/
views/
scripts/
index/
foo/
helpers/
filters/
blog/
controllers/
IndexController.php
models/
views/
scripts/
index/
helpers/
filters/
For example, under the models dir in blog module i have a class called myClass.php,I then try to call this Code:
public function blog_IndexAction(){
$myclass = new myClass()
}
and it fails as it can't find class 'myClass'. I've tried Code:
public function blog_IndexAction(){
$myclass = new blog_myClass()
}
|
|
|||
|
If you name your class blog_models_myclass it should work just fine.
The zend loader assumes that classes have their path in their name. / or \ would be replaced by _ tho. If that doesn't help, make sure that "application/" is in your php include path. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|