private function readConfig() { if (!$this->filename) { throw new \RuntimeException('A valid configuration file must be passed before reading the config.'); } if (!file_exists($this->filename)) { throw new \InvalidArgumentException(sprintf("The config file '%s' does not exist.", $this->filename)); } if ($this->driver->supports($this->filename)) { return $this->driver->load($this->filename); } throw new \InvalidArgumentException(sprintf("The config file '%s' appears to have an invalid format.", $this->filename)); }
function supports($filename) { return $this->driver->supports($filename); }