Download the PHP package fxcosta/zf2-for-1 without Composer
On this page you can find all versions of the php package fxcosta/zf2-for-1. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fxcosta/zf2-for-1
More information about fxcosta/zf2-for-1
Files in fxcosta/zf2-for-1
Package zf2-for-1
Short Description Compatibility layer for ZF1 application allowing usage of ZF2 features
License
Homepage https://github.com/Roave/zf2-for-1
Informations about the package zf2-for-1
ZF 2-for-1
Version 0.0.1 Created by Evan Coury and Xerkus.
Introduction
Original intention of ZF2-for-1 was to provide a compatibility layer for Zend Framework 1, allowing to use Zend Framework 2 features in ZF1 application. ZF2-for-1 provides some basic functionality for such integration indeed, but we believe that migrating to ZF2 is a way to go.
In fact it proved to be quite easy to move (M)VC layer of ZF1 application to
ZF2. And much easier than to run both applications in parallel.
It is explained by the fact that ZF2 is very flexible while ZF1... well,
not.
This opens possibility for fast straightforward migration, while keeping
most of the application code intact, and for gradual refactoring towards modern
zf2 application afterwards.
To outline said above: current goal of Zf2-for-1 is to reimplement some of the ZF1 features in ZF2 to make initial migration fast and easy.
Current Features
Basic features for zf1 application
- Registers the ZF2 autoloader
- Bootstraps ZF2 configuration and modules
- Makes ZF2 ServiceManager available to zf1 application
- Makes ZF1 application config and bootstrap object available to ServiceManager
- Registers ServiceManager in
Zend_Registry
under'service_manager'
key
Features for initial migration to ZF2
- Helper class to mimic zf1 request parameters fallback: route -> get -> post
Installation
Composer install:
-
Add to you composer.json
- Run composer install
- Add this to
application/configs/application.ini
:
Example can be found here
Alternative install:
- Clone this repository into
APPLICATION_PATH/../vendor/Zf2for1
directory. - Download ZF2 and put the
library/Zend
directory inAPPLICATION_PATH/../vendor/ZF2/
(Resulting path should be vendor/ZF2/Zend) - Add this to
application/configs/application.ini
:
Plans
There are a lot of ways this could be improved.
- More features
- Usage examples
- Update README
License
ZF 2-for-1 is released under the New BSD license. See the included LICENSE file.