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

fileMappingDriversRequireConfiguredDirectoryPath() public static method

    public static function fileMappingDriversRequireConfiguredDirectoryPath()
    {
        return new self('File mapping drivers must have a valid directory path, however the given path seems to be incorrect!');
    }

Usage Example

Exemplo n.º 1
1
 public function getAllClassNames()
 {
     if (null === $this->classCache) {
         $this->initialize();
     }
     $classes = array();
     if ($this->paths) {
         foreach ((array) $this->paths as $path) {
             if (!is_dir($path)) {
                 throw MappingException::fileMappingDriversRequireConfiguredDirectoryPath($path);
             }
             $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::LEAVES_ONLY);
             foreach ($iterator as $file) {
                 $fileName = $file->getBasename($this->fileExtension);
                 if ($fileName == $file->getBasename() || $fileName == $this->globalBasename) {
                     continue;
                 }
                 // NOTE: All files found here means classes are not transient!
                 if (isset($this->prefixes[$path])) {
                     $classes[] = $this->prefixes[$path] . '\\' . str_replace('.', '\\', $fileName);
                 } else {
                     $classes[] = str_replace('.', '\\', $fileName);
                 }
             }
         }
     }
     return array_merge($classes, array_keys($this->classCache));
 }
All Usage Examples Of Doctrine\ODM\CouchDB\Mapping\MappingException::fileMappingDriversRequireConfiguredDirectoryPath