mainlycode / zf1wrapperbundle
此包已被 废弃 且不再维护。未建议替代包。
Symfony 2 扩展包,用于封装 Zend Framework 1 旧版应用程序
dev-master
2014-01-03 09:40 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- zendframework/zendframework1: 1.12.*@dev
This package is auto-updated.
Last update: 2022-02-01 12:25:04 UTC
README
介绍
Zf1WrapperBundle 是一个用于封装 Zend Framework 1 应用程序的 Symfony 2 扩展包。它可以用来重构您的旧版代码以适配 Symfony 2。
安装
Composer
将以下内容添加到您的 composer.json 文件中
"require": {
"mainlycode/zf1wrapperbundle": "dev-master"
}
配置
1. config.yml
您需要配置的是 ZF1 启动文件的路径(例如 index.php)。将以下内容添加到您的 config.yml 文件中
parameters:
#Zf1WrapperBundle
zf1wrapper_bootstrap_path: ../web/index.php
2. routing.yml
此扩展包使用一个通配符路由,您需要将其添加到 routing.yml 文件中
zf1_wrapper:
resource: "@Zf1WrapperBundle/Resources/config/routing.yml"
prefix: /
3. AppKernel.php
将以下内容添加到您的 app/AppKernel.php 文件中以启用此扩展包
public function registerBundles()
{
return array(
// ...
new MainlyCode\Zf1WrapperBundle\Zf1WrapperBundle(),
);
}