private function determineDriver($file)
    {
        $exception = new InvalidArgumentException(
            "Cannot initialize the configuration driver. I could not determine ".
            "the correct driver class."
        );

        if (is_null($file) || !is_string($file)) {
            throw $exception;
        }

        $nameDivision = explode('.', $file);
        $extension = strtolower(end($nameDivision));

        if (!array_key_exists($extension, $this->extensionToDriver)) {
            throw $exception;
        }

        return $this->extensionToDriver[$extension];
    }
private function determineDriver($file)
    {
        $exception = new InvalidArgumentException(
            "Cannot initialize the configuration driver. I could not determine ".
            "the correct driver class."
        );

        if (is_null($file) || !is_string($file)) {
            throw $exception;
        }

        $nameDivision = explode('.', $file);
        $extension = strtolower(end($nameDivision));

        if (!array_key_exists($extension, $this->extensionToDriver)) {
            throw $exception;
        }

        return $this->extensionToDriver[$extension];
    }
private function determineDriver ( $ file ) { $ exception = new InvalidArgumentException ( "Cannot initialize the configuration driver. I could not determine " . "the correct driver class." ) ; if ( is_null ( $ file ) || ! is_string ( $ file ) ) { throw $ exception ; } $ nameDivision = explode ( '.' , $ file ) ; $ extension = strtolower ( end ( $ nameDivision ) ) ; if ( ! array_key_exists ( $ extension , $ this -> extensionToDriver ) ) { throw $ exception ; } return $ this -> extensionToDriver [ $ extension ] ; }
Tries to determine the driver class based on given file

@param string $file
@return mixed
Tries to determine the driver class based on given file