Great podcast Jon - fantastic for a new Zend user like myself.
However, after completing the stages in this episode I seem to be getting an autoloader issue trying to find the Model classes. Maybe you can help me resolve it.
My doctrine application.ini section looks like:
doctrine.generate_models_options.pearStyle = true
doctrine.generate_models_options.generateTableClasses = false
doctrine.generate_models_options.generateBaseClasses = true
doctrine.generate_models_options.baseClassPrefix = "Base_"
doctrine.generate_models_options.classPrefixFiles = false
doctrine.generate_models_options.classPrefix = "Model_"
doctrine.generate_models_options.baseClassesDirectory =
Which generates the Models folder structure:
application/models/Base/User.php
application/models/User.php
Both classes have the prefix: Model_User & Model_Base_User
When I come to login to the page (do the postback) I get the following exception:
Fatal error: Class 'Model_User' not found in /usr/local/zend/apache2/htdocs/Project/library/FME/Auth/Adapter.php on line 23
The Adapter.php class being the one you wrote in the episode that is dependent on Model_User.
The classloader cannot find the class/file. I have modified the doctrine config trying many permutations trying to fix this but it does not resolve the Zend issue, and just results in Doctrine CLI throwinf the following:
build-all-reload - Are you sure you wish to drop your databases? (y/n)
y
build-all-reload - Successfully dropped database for connection named 'doctrine'
build-all-reload - Generated models successfully from YAML schema
build-all-reload - Successfully created database for connection named 'doctrine'
build-all-reload - Created tables successfully
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'fme.user' doesn't exist. Failing Query: "DELETE FROM user"
If I set:
doctrine.generate_models_options.pearStyle = false (instead of true)
then the Doctrine CLI works fine and puts the user data into the table correctly - however Zend still complains about the class missing.
Thanks for any pointers you can give me to fix this,