public function getExtension() { return pathinfo($this->getBasename(), PATHINFO_EXTENSION); }
/** * Finds and returns the file if exists * * @return Fakerino\Configuration\ConfigurationInterface * @throws ConfNotSupportedException */ public function load() { $file = new File($this->filePath); $fileExt = $file->getExtension(); $fileConfClass = $this->getConfigFileClass($fileExt); if (class_exists($fileConfClass)) { $fileConf = new $fileConfClass($file); return $fileConf; } throw new ConfNotSupportedException($this->filePath); }