https://github.com/25th-floor/zf2-repository-initializer
https://github.com/25th-floor/zf2-repository-initializer
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/25th-floor/zf2-repository-initializer
- Owner: 25th-floor
- Created: 2014-02-10T16:38:17.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-01T10:20:39.000Z (over 11 years ago)
- Last Synced: 2025-01-30T02:41:29.121Z (4 months ago)
- Language: PHP
- Size: 217 KB
- Stars: 0
- Watchers: 10
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A ZF2 initializer for Repositories
## Installation
Add the following as requirement to you composer.json:
25th/zf2-repository-initializer": "dev-master"
## Usage
Add the class as initializer in the appropriate module.config.php.
'initializers' => [
'TwentyFifth\Zf2RepositoryInitializer\Initializer',
],The injection targets must implement a sub-interface of TwentyFifth\ZF2RepositoryInitializer\RepositoryAware and
this sub-interface must specify a service key that will be used to look for the injection object. The name of the interface
must end with Aware like FooRepositoryAware and the Initializer also requires the sub-interface or the injection
target to implement a method set<RepositoryName> where RepositoryName is the Prefix to Aware. So all subclasses
of FooRepositoryAware must have a method setFooRepository.Further the interface must provide an annotation @repositoryService which specifies a service key. The service
manager will be called with this key in order to load the service.## TODO
- Reflection Caching
- Tests
- Correct composer dependencies (ZF2, PHP, ... ?)