Zend 1 不支持 psr-4 命名空间

Zend 1 not working with psr-4 namespaces

我正在开发 zend framework 1 但我想使用 \ 而不是 _

喜欢

class IndexController extends Zend_Controller_Action 

这工作正常,但是当我通过

更改它时
class IndexController extends \Zend\Controller\Action

然后它给我一个错误

Fatal error: Cannot redeclare class Zend_Controller_Action in /var/www/flipit_application/vendor/zendframework/zendframework1/library/Zend/Controller/Action.php on line 43

我已经在 composer 中创建了命名空间

"autoload": {
        "psr-4": {
            "Zend\": "vendor/zendframework/zendframework1/library/Zend/"
        }
    },

那么如何在代码中使用这些命名空间

这在 Zend Framework1 中可行吗?

Zend Framework 1 不使用 psr-4 自动加载,它使用 psr-0:

"autoload": {
    "psr-0": {
        "Zend_": "vendor/zendframework/zendframework1/library"
    }
}