You are here

abstract class ObjectManagerDecorator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php \Doctrine\Common\Persistence\ObjectManagerDecorator

Base class to simplify ObjectManager decorators

@license http://opensource.org/licenses/MIT MIT @link www.doctrine-project.org @since 2.4 @author Lars Strojny <lars@strojny.net>

Hierarchy

Expanded class hierarchy of ObjectManagerDecorator

1 file declares its use of ObjectManagerDecorator
ObjectManagerDecoratorTest.php in vendor/doctrine/common/tests/Doctrine/Tests/Common/Persistence/ObjectManagerDecoratorTest.php

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php, line 30

Namespace

Doctrine\Common\Persistence
View source
abstract class ObjectManagerDecorator implements ObjectManager {

  /**
   * @var ObjectManager
   */
  protected $wrapped;

  /**
   * {@inheritdoc}
   */
  public function find($className, $id) {
    return $this->wrapped
      ->find($className, $id);
  }

  /**
   * {@inheritdoc}
   */
  public function persist($object) {
    return $this->wrapped
      ->persist($object);
  }

  /**
   * {@inheritdoc}
   */
  public function remove($object) {
    return $this->wrapped
      ->remove($object);
  }

  /**
   * {@inheritdoc}
   */
  public function merge($object) {
    return $this->wrapped
      ->merge($object);
  }

  /**
   * {@inheritdoc}
   */
  public function clear($objectName = null) {
    return $this->wrapped
      ->clear($objectName);
  }

  /**
   * {@inheritdoc}
   */
  public function detach($object) {
    return $this->wrapped
      ->detach($object);
  }

  /**
   * {@inheritdoc}
   */
  public function refresh($object) {
    return $this->wrapped
      ->refresh($object);
  }

  /**
   * {@inheritdoc}
   */
  public function flush() {
    return $this->wrapped
      ->flush();
  }

  /**
   * {@inheritdoc}
   */
  public function getRepository($className) {
    return $this->wrapped
      ->getRepository($className);
  }

  /**
   * {@inheritdoc}
   */
  public function getClassMetadata($className) {
    return $this->wrapped
      ->getClassMetadata($className);
  }

  /**
   * {@inheritdoc}
   */
  public function getMetadataFactory() {
    return $this->wrapped
      ->getMetadataFactory();
  }

  /**
   * {@inheritdoc}
   */
  public function initializeObject($obj) {
    return $this->wrapped
      ->initializeObject($obj);
  }

  /**
   * {@inheritdoc}
   */
  public function contains($object) {
    return $this->wrapped
      ->contains($object);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ObjectManagerDecorator::$wrapped protected property
ObjectManagerDecorator::clear public function Clears the ObjectManager. All objects that are currently managed by this ObjectManager become detached. Overrides ObjectManager::clear
ObjectManagerDecorator::contains public function Checks if the object is part of the current UnitOfWork and therefore managed. Overrides ObjectManager::contains
ObjectManagerDecorator::detach public function Detaches an object from the ObjectManager, causing a managed object to become detached. Unflushed changes made to the object if any (including removal of the object), will not be synchronized to the database. Objects which previously referenced the… Overrides ObjectManager::detach
ObjectManagerDecorator::find public function Finds an object by its identifier. Overrides ObjectManager::find
ObjectManagerDecorator::flush public function Flushes all changes to objects that have been queued up to now to the database. This effectively synchronizes the in-memory state of managed objects with the database. Overrides ObjectManager::flush
ObjectManagerDecorator::getClassMetadata public function Returns the ClassMetadata descriptor for a class. Overrides ObjectManager::getClassMetadata
ObjectManagerDecorator::getMetadataFactory public function Gets the metadata factory used to gather the metadata of classes. Overrides ObjectManager::getMetadataFactory
ObjectManagerDecorator::getRepository public function Gets the repository for a class. Overrides ObjectManager::getRepository
ObjectManagerDecorator::initializeObject public function Helper method to initialize a lazy loading proxy or persistent collection. Overrides ObjectManager::initializeObject
ObjectManagerDecorator::merge public function Merges the state of a detached object into the persistence context of this ObjectManager and returns the managed copy of the object. The object passed to merge will not become associated/managed with this ObjectManager. Overrides ObjectManager::merge
ObjectManagerDecorator::persist public function Tells the ObjectManager to make an instance managed and persistent. Overrides ObjectManager::persist
ObjectManagerDecorator::refresh public function Refreshes the persistent state of an object from the database, overriding any local changes that have not yet been persisted. Overrides ObjectManager::refresh
ObjectManagerDecorator::remove public function Removes an object instance. Overrides ObjectManager::remove