Doctrine\ODM\CouchDB\Mapping\MappingException::classNotFound PHP Method

classNotFound() public static method

public static classNotFound ( $className )
    public static function classNotFound($className)
    {
        return new self('The class: ' . $className . ' could not be found');
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * Loads the metadata of the class in question and all it's ancestors whose metadata
  * is still not loaded.
  *
  * @param string $className The name of the class for which the metadata should get loaded.
  */
 private function loadMetadata($name)
 {
     if (!class_exists($name)) {
         throw MappingException::classNotFound($name);
     }
     $parentClasses = $this->getParentClasses($name);
     $parentClasses[] = $name;
     $loaded = array();
     $parent = null;
     /* @var $parent ClassMetadata */
     foreach ($parentClasses as $className) {
         if (isset($this->loadedMetadata[$className])) {
             $parent = $this->loadedMetadata[$className];
             continue;
         }
         // original class was checked above already
         if ($className != $name && !class_exists($className)) {
             throw MappingException::classNotFound($className);
         }
         if ($parent) {
             $class = $parent->deriveChildMetadata($className);
         } else {
             $class = new ClassMetadata($className);
         }
         $this->loadedMetadata[$className] = $class;
         $this->driver->loadMetadataForClass($className, $this->loadedMetadata[$className]);
         $parent = $class;
         $loaded[] = $className;
     }
     return $loaded;
 }
All Usage Examples Of Doctrine\ODM\CouchDB\Mapping\MappingException::classNotFound