dev-master
9999999-devBasic Object Manager to work with Doctrine or Mongo
GPLv2
The Requires
- php >=5.3.3
- symfony/framework-bundle ~2.3
Basic Object Manager to work with Doctrine or Mongo
Basic Object Manager actions to work with Doctrine or MongoDB. Validates entities/documents before being persisted. Provides basic repository methods., (*1)
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
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
Dispatch events on entity/document actions, (*6)
Basic Object Manager to work with Doctrine or Mongo
GPLv2