/** * @param $path * @return bool * @throws ConfigurationException * @throws \Yamveecee\Resources\IllegalPathException */ public function addPath($path) { if (null === $this->finder) { throw new \Yamveecee\Service\ConfigurationException('no resource finder set in classfinder service'); } return $this->finder->addPath($path); }
/** * @param $className */ public function loadClass($className) { $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $className); if (null !== $this->finder) { $fileToIncludeDto = $this->finder->find($fileName, $this->classFileExtensions); require $fileToIncludeDto->getFullFileName(); } else { require $fileName; } }