Hello everyone,
I have a few questions that I've not been able to find answers for. Perhaps I've overlooked them.
I am using the following environment.
Ubuntu 7.10 32bit
MySQL 5.0
PHP 5.2.x
Zend Framework 1.5
I have started a test application, and I have broken down my application directory as follows:
Code:
application/
|-- config
| |-- datasources.xml
`-- modules
|-- admin
| |-- config
| |-- controllers
| | |-- IndexController.php
| |-- models
| `-- views
| |-- filters
| |-- helpers
| `-- scripts
| `-- index
| |-- extract.phtml
| |-- index.phtml
`-- default
|-- config
|-- controllers
| |-- IndexController.php
| |-- UserController.php
|-- models
| `-- Persons.php
`-- views
|-- filters
|-- helpers
`-- scripts
`-- index
|-- extract.phtml
|-- index.phtml
I have added the following line to my bootstrap so that I can add all of the controller directories to my path
Code:
$frontController->addModuleDirectory($this->module_path);
This works great. The question I have is how do I add the "models" directory? I did not see a similar method for models. I am not well versed yet with regards to plugins and helpers (though I am trying. ;-) ) I understand the models directory is currently unknown. How can I add the "models" directory for each module without resorting to loading them all up into the include path? Is that possible? I assume it is.
For my next question.
In my 'library' directory, I have the Zend library directory. I also have my own Library, 'MyLibs'. How can I use Zend_autoload with, 'MyLibs'?
...and finally....
I am currently using the Zend_Registry to store database connection information for a particular application. I have also read about Globals.php and how to use it. I am assuming its better to use the registry as I am currently using it. Why would I use something like Globals.php vs the registry? Did I miss something as to why Globals.php is good or does Zend_Registry really replace it?
Any thoughts, insight or suggestions that anyone may have would be greatly appreciated.
Thank you.