25th/zf2-repository-initializer

There is no license information available for the latest version (dev-master) of this package.
Package info

github.com/25th-floor/zf2-repository-initializer

pkg:composer/25th/zf2-repository-initializer

Statistics

Installs: 9 094

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-master 2014-03-01 10:20 UTC

Requires

  • php: >=5.4

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

Unknown License 41a4f35c6d06cd7db9f70a702feb51754d1d036c

  • Martin Prebio <mp.woop@25th-floor.com>

This package is not auto-updated.

Last update: 2026-06-21 00:58:19 UTC


README

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, ... ?)