views:

25

answers:

1

I tried to search here before creating this, but I couldn't find anything.

I have a simple project without modules and I'd like to load my models (which are inside application/models) without using any namespace and without usign any extra loading lines.

Basically what I want to do is to have my class Projects extends Zend_Db_Table_Abstract inside my models folder and to load it in my controller using $db = new Projects();

Is there anyway to do this? Is it recommended to use Model_Projects instead?

What If I had modules?

Edit:

I tried to use this without any other implementation and I got Class 'Projects' not found

A: 

It is because the Projects class is not autoloaded. Depending on your application namespace, (for example the default namespace 'Default') you have to name your class into something like: Default_Model_Projects

Lysender
how do I define my application namespace? Remember that I'm not using modules
Rodrigo Alves
Application namespace can be set at config, ex: appNamespace = "Default"
Lysender