Reputation: 795
I am working on zend framework 1 But I want to use \ instead of _
Like
class IndexController extends Zend_Controller_Action
This is working fine but when I changed this by
class IndexController extends \Zend\Controller\Action
Then its giving me a error
Fatal error: Cannot redeclare class Zend_Controller_Action in /var/www/flipit_application/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php on line 43
I have created the namespaces in composer
"autoload": {
"psr-4": {
"Zend\\": "vendor/zendframework/zendframework1/library/Zend/"
}
},
So how Can use these namespaces in code
Is this possible in Zend Framework1?.
Upvotes: 2
Views: 693
Reputation: 6401
Zend Framework 1 doesn't use psr-4 autoloading, it uses psr-0:
"autoload": {
"psr-0": {
"Zend_": "vendor/zendframework/zendframework1/library"
}
}
Upvotes: 1