You are here

private function PersistentObject::initializeDoctrine in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php \Doctrine\Common\Persistence\PersistentObject::initializeDoctrine()

Initializes Doctrine Metadata for this class.

Return value

void

Throws

\RuntimeException

3 calls to PersistentObject::initializeDoctrine()
PersistentObject::add in vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php
Adds an object to a collection.
PersistentObject::get in vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php
Gets a persistent field value.
PersistentObject::set in vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php
Sets a persistent fields value.

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php, line 217

Class

PersistentObject
PersistentObject base class that implements getter/setter methods for all mapped fields and associations by overriding __call.

Namespace

Doctrine\Common\Persistence

Code

private function initializeDoctrine() {
  if ($this->cm !== null) {
    return;
  }
  if (!self::$objectManager) {
    throw new \RuntimeException("No runtime object manager set. Call PersistentObject#setObjectManager().");
  }
  $this->cm = self::$objectManager
    ->getClassMetadata(get_class($this));
}