在 Zend_Framework 中自动加载 Symfony 类

发布于 2024-09-17 01:00:56 字数 120 浏览 1 评论 0原文

如何在基于 Zend Framework 的应用程序中自动加载 Symfony 类?我可以将某种 Symfony 自动加载器推送到 Zend 的自动加载器吗?

我需要使用一些组件,例如输出转义器或依赖项注入类。

How to autoload Symfony classes in the app based on Zend Framework? Can I push some kind of Symfony autoloader to the Zend's Autoloader?

I need to use some of the components like output escaper or dependency injection classes.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

昔梦 2024-09-24 01:00:56

Zend 的自动加载器可以接受多个自动加载器:

$autoloader->pushAutoloader(array('ezcBase', 'autoload'), 'ezc');

上面是直接来自手册 并展示了如何包含 ezComponents(现在的 Zeta Components)的自动加载器作为附加加载器。您可以尝试通过提供 Sfs Autoloader 来走这条路。

Zend's autoloader can accept multiple autoloaders:

$autoloader->pushAutoloader(array('ezcBase', 'autoload'), 'ezc');

The above is straight from the manual and shows how to include the autoloader of ezComponents (now Zeta Components) as an additional loader. You can try to go this route by providing Sfs Autoloader.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文