2017 © Pedro Peláez
 

library doctrine-manager

doctrine manager

image

foreverglory/doctrine-manager

doctrine manager

  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Doctrine Manager

Usage

require composer.json, (*1)

{
    "require": {
        "foreverglory/doctrine-manager": "~1.0"
    }
}

add service, (*2)

services:
    doctrine.manager.example:
        class: Glory\DoctrineManager\DoctrineManager
        arguments: ['@doctrine']

add ClassName, (*3)

//src:DependencyInjection/AppExtension.php
namespace AppBundle\DependencyInjection;

class AppExtension extends Extension
{

    public function load(array $configs, ContainerBuilder $container)
    {
        $configuration = new Configuration();
        $config = $this->processConfiguration($configuration, $configs);

        //通过配置参数,设置manager的class
        $container->getDefinition('doctrine.manager.example')
                ->addMethodCall('setClass', [$config['app_class']]);

    }
}

black code, (*4)

$this->get('doctrine.manager.example')->find($id);
$this->get('doctrine.manager.example')->findAll();
$this->get('doctrine.manager.example')->findOneBy($criteria);
$this->get('doctrine.manager.example')->findBy($criteria);
$this->get('doctrine.manager.example')->create($properties);
$this->get('doctrine.manager.example')->update($properties);
$this->get('doctrine.manager.example')->delete($properties);
$this->get('doctrine.manager.example')->getManager();
$this->get('doctrine.manager.example')->getRepository();

The Versions

30/07 2016

dev-master

9999999-dev http://foreverglory.me

doctrine manager

  Sources   Download

MIT

The Requires

 

library doctrine

30/07 2016

v1.0.1

1.0.1.0 http://foreverglory.me

doctrine manager

  Sources   Download

MIT

The Requires

 

library doctrine

25/07 2016

v1.0.0

1.0.0.0 http://foreverglory.me

doctrine manager

  Sources   Download

MIT

The Requires

 

library doctrine