/** * {@inheritDoc} */ public function getAllClassNames() { $classes = array(); if ($this->_paths) { $declared = get_declared_classes(); foreach ((array) $this->_paths as $path) { if (!is_dir($path)) { throw MappingException::annotationDriverRequiresConfiguredDirectoryPath(); } $iterator = new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($path), \RecursiveIteratorIterator::LEAVES_ONLY); foreach ($iterator as $file) { if (($fileName = $file->getBasename($this->_fileExtension)) == $file->getBasename()) { continue; } require_once $file->getPathName(); } } $declared = array_diff(get_declared_classes(), $declared); foreach ($declared as $className) { if (!$this->isTransient($className)) { $classes[] = $className; } } } return $classes; }