public function getContents()
    {
        // If an offset is provided
        if ($this->offset !== -1) {
            // Seek to the offset
            $this->stream->seek($this->offset);
        }

        // If a max length is provided
        if ($this->maxLength !== -1) {
            // Read from the offset till the maxLength
            return $this->stream->read($this->maxLength);
        }

        return $this->stream->getContents();
    }
public function getContents()
    {
        // If an offset is provided
        if ($this->offset !== -1) {
            // Seek to the offset
            $this->stream->seek($this->offset);
        }

        // If a max length is provided
        if ($this->maxLength !== -1) {
            // Read from the offset till the maxLength
            return $this->stream->read($this->maxLength);
        }

        return $this->stream->getContents();
    }
public function getContents ( ) { // If an offset is provided if ( $ this -> offset !== - 1 ) { // Seek to the offset $ this -> stream -> seek ( $ this -> offset ) ; } // If a max length is provided if ( $ this -> maxLength !== - 1 ) { // Read from the offset till the maxLength return $ this -> stream -> read ( $ this -> maxLength ) ; } return $ this -> stream -> getContents ( ) ; }
Return the contents of the file

@return string
Return the contents of the file