Swift_ByteStream_FileByteStream::_getReadHandle PHP Method

_getReadHandle() private method

Get the resource for reading
private _getReadHandle ( )
    private function _getReadHandle()
    {
        if (!isset($this->_reader)) {
            $pointer = @fopen($this->_path, 'rb');
            if (!$pointer) {
                throw new Swift_IoException('Unable to open file for reading [' . $this->_path . ']');
            }
            $this->_reader = $pointer;
            if ($this->_offset != 0) {
                $this->_getReadStreamSeekableStatus();
                $this->_seekReadStreamToPosition($this->_offset);
            }
        }
        return $this->_reader;
    }