public function load(): ResponseInterface
    {
        if (false === mb_strpos($this->file, '://')) {
            if (!is_file($this->file)) {
                throw new Exception('The given local file [' . $this->file . '] is not a file', Exception::LOCAL_FILE_NOT_READABLE);
            }

            if (!is_readable($this->file)) {
                throw new Exception('The given local file [' . $this->file . '] is not readable', Exception::LOCAL_FILE_NOT_READABLE);
            }
        }

        $stream = fopen($this->file, 'rb', false);

        if (false === $stream) {
            throw new Exception('could not read content from the given local file  [' . $this->file . ']', Exception::LOCAL_FILE_NOT_READABLE);
        }

        return new Response(200, [], new Stream($stream));
    }
public function load(): ResponseInterface
    {
        if (false === mb_strpos($this->file, '://')) {
            if (!is_file($this->file)) {
                throw new Exception('The given local file [' . $this->file . '] is not a file', Exception::LOCAL_FILE_NOT_READABLE);
            }

            if (!is_readable($this->file)) {
                throw new Exception('The given local file [' . $this->file . '] is not readable', Exception::LOCAL_FILE_NOT_READABLE);
            }
        }

        $stream = fopen($this->file, 'rb', false);

        if (false === $stream) {
            throw new Exception('could not read content from the given local file  [' . $this->file . ']', Exception::LOCAL_FILE_NOT_READABLE);
        }

        return new Response(200, [], new Stream($stream));
    }
public function load ( ) : ResponseInterface { if ( false === mb_strpos ( $ this -> file , '://' ) ) { if ( ! is_file ( $ this -> file ) ) { throw new Exception ( 'The given local file [' . $ this -> file . '] is not a file' , Exception :: LOCAL_FILE_NOT_READABLE ) ; } if ( ! is_readable ( $ this -> file ) ) { throw new Exception ( 'The given local file [' . $ this -> file . '] is not readable' , Exception :: LOCAL_FILE_NOT_READABLE ) ; } } $ stream = fopen ( $ this -> file , 'rb' , false ) ; if ( false === $ stream ) { throw new Exception ( 'could not read content from the given local file  [' . $ this -> file . ']' , Exception :: LOCAL_FILE_NOT_READABLE ) ; } return new Response ( 200 , [ ] , new Stream ( $ stream ) ) ; }
loads the ini file from a remote or local location and stores it into
the cache dir, parses the ini file

@throws \FileLoader\Exception

@return \Psr\Http\Message\ResponseInterface
loads the ini file from a remote or local location and stores it into the cache dir parses the ini file