This class manages and resolves dependencies on the Zend Framework. It catches missing ZF classes and fetches it from the ZF online repository.
- Use Zend Framework dependent code anywhere - just include this class and it will build the library needed to run the code
- Minimize your Zend Framework library in active projects. The dependency manager fetches only ZF components that are used in the project.
Usage is very simple - include the class and initialize it using the static ::start() function:
Configuration and tests
The start() method accepts several optional parameters -
- 'libraryPath' - The local location of the ZF classes fetched by the ZF dependency manager. Default is relative to the location of the class file.
- 'zfVersion' - The version of Zend Framework to use. Default is 1.10.8
- 'prependStack' - Whether to prepend the autoload function to the autoload stack. Default is true, change to false if it interfers with other autoloaders.
- 'repository' - Location of the Zend Framework repository. Default is the online repository hosted by Zend, you can change to a local location for better performance. Note that the version parameter is automaticaly appended to this parameter to resolve the location of the files, so set the zfVersion parameter to an empty string if you use a local repo without a version folder.
Provided is a PHPUnit test suite for the class. Included with the test suite are several test files to speed up testing by fetching the files locally. The test files are inside the 'zdmfiles' directory, which must be placed at the same location as the ZpmTest suite.