2017 © Pedro Peláez
 

library doctrine-orm-manager-registry-provider

Doctrine ORM Manager Registry Provider

image

dominikzogg/doctrine-orm-manager-registry-provider

Doctrine ORM Manager Registry Provider

  • Friday, April 20, 2018
  • by dominikzogg
  • Repository
  • 1 Watchers
  • 0 Stars
  • 16,784 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 7 Forks
  • 0 Open issues
  • 13 Versions
  • 4 % Grown

The README.md

saxulum/saxulum-doctrine-orm-manager-registry-provider

Build Status PHP 7 ready Total Downloads Latest Stable Version Scrutinizer Code Quality, (*1)

Features

Requirements

  • PHP 5.3+
  • Doctrine ~2.3
  • Pimple ~2.1

Currently requires both dbs and orm.ems services in order to work. These can be provided by a Doctrine Service Provider like the Silex or Cilex and the Doctrine ORM Service Provider like the dflydev-doctrine-orm-service-provider service providers. If you can or want to fake it, go for it. :), (*2)

Installation

Through Composer as saxulum/saxulum-doctrine-orm-manager-registry-provider., (*3)

```{.sh} composer require "saxulum/saxulum-doctrine-orm-manager-registry-provider": "~3.0", (*4)


```{.php} <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; $app->register(new DoctrineOrmManagerRegistryProvider());

Form Entity Type

If you like to have Entity Type Support within Symfony Form Component, install the Doctrine Bridge and register the form provider first., (*5)

```{.json} { "require": { "symfony/doctrine-bridge": "~2.2", "symfony/form": "~2.2" } }, (*6)


```{.php} <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Silex\Provider\FormServiceProvider; $app->register(new FormServiceProvider()); $app->register(new DoctrineOrmManagerRegistryProvider());

Validator

If you like to have UniqueEntity Constraint Support within [Symfony Validator Component][9], install the Doctrine Bridge and register the validator provider first., (*7)

```{.json} { "require": { "symfony/doctrine-bridge": "~2.2", "symfony/validator": "~2.2" } }, (*8)


```{.php} <?php use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Silex\Provider\ValidatorServiceProvider; $app->register(new ValidatorServiceProvider()); $app->register(new DoctrineOrmManagerRegistryProvider());

```{.php} <?php, (*9)

use Doctrine\ORM\Mapping as ORM; use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity; use Symfony\Component\Validator\Mapping\ClassMetadata;, (*10)

/** * @ORM\Entity() * @ORM\Table(name="sample") */ class Sample { /** * @var string * @ORM\Column(name="name", type="string") */ protected $name;, (*11)

/**
 * @param ClassMetadata $metadata
 */
public static function loadValidatorMetadata(ClassMetadata $metadata)
{
    $metadata->addConstraint(new UniqueEntity(array(
        'fields'  => 'name',
        'message' => 'This name already exists.',
    )));
}

}, (*12)


### Doctrine ORM Console If you like to use [Doctrine ORM Commands][7], install [Doctrine ORM Commands][7] and the [Saxulum Console Provider][8] and register the console provider. ```{.json} { "require": { "saxulum/saxulum-doctrine-orm-commands": "~1.2,>=1.2.2", "saxulum/saxulum-console": "~3.1", } }

```{.php} <?php, (*13)

use Saxulum\DoctrineOrmManagerRegistry\Provider\DoctrineOrmManagerRegistryProvider; use Saxulum\Console\Silex\Provider\ConsoleProvider;, (*14)

$app->register(new ConsoleProvider()); $app->register(new DoctrineOrmManagerRegistryProvider());, (*15)


Usage ----- ```{.php} <?php // get the default connection name $app['doctrine']->getDefaultConnectionName(); // get the default connection $app['doctrine']->getConnection(); // get a connection by name $app['doctrine']->getConnection('name'); // all connections as array access (pimple) $app['doctrine']->getConnections(); // all connection names as array $app['doctrine']->getConnectionNames(); // get the default manager name $app['doctrine']->getDefaultManagerName(); // get the default manager $app['doctrine']->getManager(); // get a manager by name $app['doctrine']->getManager('name'); // all manager as array access (pimple) $app['doctrine']->getManagers(); // all manager names as array $app['doctrine']->getManagerNames(); ...

The Versions

20/04 2018

v1.x-dev

1.9999999.9999999.9999999-dev

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

22/02 2014

1.x-dev

1.9999999.9999999.9999999-dev

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

01/02 2014

1.3.5

1.3.5.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

18/01 2014

1.3.4

1.3.4.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

16/01 2014

1.3.2

1.3.2.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

16/01 2014

1.3.3

1.3.3.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

16/01 2014

1.3.1

1.3.1.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

09/01 2014

1.3.0

1.3.0.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

14/07 2013

1.2.0

1.2.0.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

16/06 2013

1.1.1

1.1.1.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

16/06 2013

1.1

1.1.0.0

Doctrine ORM Manager Registry Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

10/06 2013

1.0.1

1.0.1.0

Doctrine ORM Registry Manager Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager

05/06 2013

1.0

1.0.0.0

Doctrine ORM Registry Manager Provider

  Sources   Download

MIT

The Requires

 

The Development Requires

by Dominik Zogg

orm silex doctrine pimple cilex registrymanager