private function PersistentObject::initializeDoctrine

Initialize Doctrine Metadata for this class.

Return value

void

Throws

\RuntimeException

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

File

drupal/core/vendor/doctrine/common/lib/Doctrine/Common/Persistence/PersistentObject.php, line 208

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));
}