I want to follow Zend file naming convention.
I have Object.php file with a class and a function in it.
MyZendProject->application->models->Test->Object.php
class Model_Test_Object {
public function test() {
echo "Test";
}
}
Now I want to access above test function in following file but it is not finding it.
MyZendProject->application->modules->test->controllers->TestController.php
$testModel = new Model_Test_Object();
$testModel->test();
But when I name the class Application_Model_Test_Object
in Object.php and call it in TestController like this then it works.
$testModel = new Application_Model_Test_Object();
$testModel->test();
Problem is that I don't want to use Application in class name because it is too long and ugly. Is there any way that I name the class Model_Test_Object
and access it anywhere in application without including any file. I have seen somewhere in Botstrap.php to solve this issue but I did not remember it and unable to find it again.
Any help will be appreciated.
Thanks