Search code examples
zend-frameworkzend-framework-mvc

Zend Framework - Class Names - Change Defualt Rules :: How Can be Zend application be configured for more short class names without folders names?


In zend project have rules default for calling classes that say to put folder class structure before class name.

Example: class Application_Model_DbTable_Albums means: that this class inside folders: Application->Model->DBTable, if its called Just class Albums he will be unrecognized.

How Can be Zend application be configured for more short class without folder location names only class name like class Album and not class Application_Model_DbTable_Albums?

Thank you,

Yosef


Solution

  • Unless you were to disable the Zend Autoloader and handle this manually (or with a different autoload mechanism), I believe you're stuck.

    You could move some of your classes up in structure, however. Our models (e.g. Model_Album) live at application/models/Album.php.