Zend Models Model_DbTable_Articles working, Articles not
I got problems with m开发者_Python百科y ZF Models.
Where I create new model, put it in Dbtable/Articles.php and name class as Model_DbTable_Articles it is working. But when I name class Articles I got error:
Fatal error: Class 'Articles' not found
Why? :)
I put this in my bootstrap.php file
$autoloader = $application->getAutoloader();
$resourceLoader = new Zend_Loader_Autoloader_Resource(array(
'basePath' => APPLICATION_PATH,
'namespace' => '',
'resourceTypes' => array(
'form' => array(
'path' => '/forms/',
'namespace' => 'Form_',
),
'model' => array(
'path' => '/models/',
'namespace' => 'Model_'
),
'table' => array(
'path' => '/tables/',
'namespace' => 'Table_'
),
),
));
精彩评论