public function load() {
        $ext = mb_strtolower(pathinfo($this->_path, PATHINFO_EXTENSION));

        switch ($ext) {
            case 'php':
                return include $this->_path;
            break;
            case 'json':
                return json_decode(file_get_contents($this->_path), true);
            break;
            case 'ini':
                return parse_ini_file($this->_path, true);
            break;
            case 'txt':
                return file($this->_path, FILE_IGNORE_NEW_LINES);
            break;
        }

        throw new UnsupportedTypeException(sprintf('Unsupported FileLoader file type %s', $ext));
    }
public function load() {
        $ext = mb_strtolower(pathinfo($this->_path, PATHINFO_EXTENSION));

        switch ($ext) {
            case 'php':
                return include $this->_path;
            break;
            case 'json':
                return json_decode(file_get_contents($this->_path), true);
            break;
            case 'ini':
                return parse_ini_file($this->_path, true);
            break;
            case 'txt':
                return file($this->_path, FILE_IGNORE_NEW_LINES);
            break;
        }

        throw new UnsupportedTypeException(sprintf('Unsupported FileLoader file type %s', $ext));
    }
public function load ( ) { $ ext = mb_strtolower ( pathinfo ( $ this -> _path , PATHINFO_EXTENSION ) ) ; switch ( $ ext ) { case 'php' : return include $ this -> _path ; break ; case 'json' : return json_decode ( file_get_contents ( $ this -> _path ) , true ) ; break ; case 'ini' : return parse_ini_file ( $ this -> _path , true ) ; break ; case 'txt' : return file ( $ this -> _path , FILE_IGNORE_NEW_LINES ) ; break ; } throw new UnsupportedTypeException ( sprintf ( 'Unsupported FileLoader file type %s' , $ ext ) ) ; }
Load the resources contents.

@return array
@throws \Decoda\Exception\UnsupportedTypeException
Load the resources contents .