2017 © Pedro Peláez
 

library container-doctrine-integration

Make doctrine repositories injectable in the weew/container.

image

weew/container-doctrine-integration

Make doctrine repositories injectable in the weew/container.

  • Thursday, July 21, 2016
  • by weew
  • Repository
  • 1 Watchers
  • 0 Stars
  • 64 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Integration of doctrine repositories

Build Status Code Quality Test Coverage Version Licence, (*1)

Table of contents

Installation

composer require weew/container-doctrine-integration, (*2)

Introduction

Doctrine repositories are not injectable on their own since they are not easily instantiable. To make it work you'll have to work with factories do some argument parsing and so on. This is exactly what this package does, it makes doctrine repositories injectable trough the weew/container container., (*3)

Conventions

There are certain conventions that you must follow to be able to inject doctrine repositories. Repositories loader does this kind of repository name to entity name conversion: Vendor\Package\Repositories\FooRepository should map to this entity Vendor\Package\Entities\Foo., (*4)

If this name matching strategy is not sufficient for you, you may provide your own implementation of the IRepositoryNameParser interface., (*5)

Usage

To make repositories injectable simply create a new instance of IDoctrineRepositoriesLoader, pass in an instance of IContainer and an instance ObjectManager and enable it., (*6)

$loader = new DoctrineRepositoriesLoader($container, $om);
$loader->enable();

The Versions

21/07 2016

dev-master

9999999-dev

Make doctrine repositories injectable in the weew/container.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Kott

21/07 2016

v1.0.1

1.0.1.0

Make doctrine repositories injectable in the weew/container.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Kott

15/01 2016

v1.0.0

1.0.0.0

Make doctrine repositories injectable in the weew/php-container.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Maxim Kott