This class was abstracted from the ORM ClassMetadataFactory
С версии: 2.2
Автор: Benjamin Eberlei (kontakt@beberlei.de)
Автор: Guilherme Blanco (guilhermeblanco@hotmail.com)
Автор: Jonathan Wage (jonwage@gmail.com)
Автор: Roman Borschel (roman@code-factory.org)
Наследование: implements Doctrine\Common\Persistence\Mapping\ClassMetadataFactory
 /**
  * {@inheritdoc}
  *
  * @throws MappingException
  */
 public function loadMetadata($className)
 {
     if (class_exists($className)) {
         return parent::loadMetadata($className);
     }
     throw MappingException::classNotFound($className);
 }
Пример #2
0
 /**
  * {@inheritDoc}
  */
 protected function loadMetadata($name)
 {
     $loaded = parent::loadMetadata($name);
     array_map([$this, 'resolveDiscriminatorValue'], array_map([$this, 'getMetadataFor'], $loaded));
     return $loaded;
 }
 public function getAllMetadata()
 {
     static $mapKey = 'maps\\$XMLCLASSMAPS';
     if ($this->allLoaded) {
         return;
     }
     $mapData = $this->getCacheDriver()->fetch($mapKey);
     if (!empty($mapData)) {
         $this->xmlToClassMap = $mapData['xmlToClassMap'];
         $this->wrapperXmlToClassMap = $mapData['wrapperXmlToClassMap'];
         $this->alternativeClassMap = $mapData['alternativeClassMap'];
         $this->attributesClassMap = $mapData['attributesClassMap'];
         $result = TRUE;
     } else {
         $result = parent::getAllMetadata();
         $mapData = $this->getCacheDriver()->save($mapKey, array('xmlToClassMap' => $this->xmlToClassMap, 'wrapperXmlToClassMap' => $this->wrapperXmlToClassMap, 'alternativeClassMap' => $this->alternativeClassMap, 'attributesClassMap' => $this->attributesClassMap));
     }
     $this->allLoaded = TRUE;
     return $result;
 }