开发者

Zend Models Model_DbTable_Articles working, Articles not

开发者 https://www.devze.com 2022-12-18 06:09 出处:网络
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 go

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_'
        ),
    ),
));
0

精彩评论

暂无评论...
验证码 换一张
取 消