2017 © Pedro Peláez
 

symfony-bundle object-manager-bundle

Basic Object Manager to work with Doctrine or Mongo

image

nazka/object-manager-bundle

Basic Object Manager to work with Doctrine or Mongo

  • Thursday, October 2, 2014
  • by jsampedro77
  • Repository
  • 1 Watchers
  • 0 Stars
  • 82 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

NazkaObjectManagerBundle

Basic Object Manager actions to work with Doctrine or MongoDB. Validates entities/documents before being persisted. Provides basic repository methods., (*1)

Installation

Create a composer.json in your projects root-directory:, (*2)

{
    "require": {
        "nazka/object-manager-bundle": "*"
    }
}

and run:, (*3)

curl -s http://getcomposer.org/installer | php
php composer.phar install

Usage

Create your manager class extending Nazka\ObjectManagerBundle\Manager\AbstractObjectManager and implement getClass() to point to the managed Entity/Document, (*4)

class NodeManager extends AbstractObjectManager
{
    protected function getClass()
    {
        return 'Control\NodeBundle\Document\Node';
    }
}

Create your manager service using the right parent service. An ORM Entity Manager should use nazka_object_manager.abstract.mongodb.manager, while and MongoDB Document Manager shoud use nazka_object_manager.abstract.mongodb.manager as service parent. YAML sample:, (*5)

control_node.node.manager:
    class: Control\NodeBundle\Manager\NodeManager
    parent: nazka_object_manager.abstract.mongodb.manager

TODO

Dispatch events on entity/document actions, (*6)

The Versions

02/10 2014

dev-master

9999999-dev

Basic Object Manager to work with Doctrine or Mongo

  Sources   Download

GPLv2

The Requires