Models d'un module autre que default non trouvé
Bonjour,
J'ai crée un model dans mon répertoire Models d'un module "Auth" :
Code:
class Auth_Model_DbTable_User extends Zend_Db_Table
emplacement :
Citation:
application / auth / models / DbTable / User.php
Dans mon controller "Auth_IndexController", je l'appelle :
Code:
$user = new Auth_Model_DbTable_User();
Dans mon navigateur voici le message d'erreur :
Citation:
Fatal error: Class 'Auth_Model_DbTable_User' not found
Voici un dump de mon AUTOLOADER
Citation:
object(Zend_Application_Module_Autoloader)#53 (5) {
["_basePath:protected"] => string(38) "XXXXXXXX\application/auth"
["_components:protected"] => array(7) {
["Model_DbTable"] => string(53) "XXXXXXXX\application/auth/models/DbTable"
["Form"] => string(44) "XXXXXXXX\application/auth/forms"
["Model"] => string(45) "XXXXXXXX\application/auth/models"
["Plugin"] => string(46) "XXXXXXXX\application/auth/plugins"
["Service"] => string(47) "XXXXXXXX\application/auth/services"
["View_Helper"] => string(52) "XXXXXXXX\application/auth/views/helpers"
["View_Filter"] => string(52) "XXXXXXXX\application/auth/views/filters"
}
["_defaultResourceType:protected"] => string(5) "model"
["_namespace:protected"] => string(0) ""
["_resourceTypes:protected"] => array(7) {
["dbtable"] => array(2) {
["namespace"] => string(13) "Model_DbTable"
["path"] => string(53) "XXXXXXXX\application/auth/models/DbTable"
}
["form"] => array(2) {
["namespace"] => string(4) "Form"
["path"] => string(44) "XXXXXXXX\application/auth/forms"
}
["model"] => array(2) {
["namespace"] => string(5) "Model"
["path"] => string(45) "XXXXXXXX\application/auth/models"
}
["plugin"] => array(2) {
["namespace"] => string(6) "Plugin"
["path"] => string(46) "XXXXXXXX\application/auth/plugins"
}
["service"] => array(2) {
["namespace"] => string(7) "Service"
["path"] => string(47) "XXXXXXXX\application/auth/services"
}
["viewhelper"] => array(2) {
["namespace"] => string(11) "View_Helper"
["path"] => string(52) "XXXXXXXX\application/auth/views/helpers"
}
["viewfilter"] => array(2) {
["namespace"] => string(11) "View_Filter"
["path"] => string(52) "XXXXXXXX\application/auth/views/filters"
}
}
}
Enfin je précise, que lorsque je place l'objet "User" dans le Model du module "Default" en supprimant les préfixes du module "Auth", cela fonctionne parfaitement.