Prado\IO\TTarFileExtractor::_openRead PHP Метод

_openRead() приватный Метод

private _openRead ( )
    private function _openRead()
    {
        if (strtolower(substr($this->_tarname, 0, 7)) == 'http://') {
            // ----- Look if a local copy need to be done
            if ($this->_temp_tarname == '') {
                $this->_temp_tarname = uniqid('tar') . '.tmp';
                if (!($v_file_from = @fopen($this->_tarname, 'rb'))) {
                    $this->_error('Unable to open in read mode \'' . $this->_tarname . '\'');
                    $this->_temp_tarname = '';
                    return false;
                }
                if (!($v_file_to = @fopen($this->_temp_tarname, 'wb'))) {
                    $this->_error('Unable to open in write mode \'' . $this->_temp_tarname . '\'');
                    $this->_temp_tarname = '';
                    return false;
                }
                while ($v_data = @fread($v_file_from, 1024)) {
                    @fwrite($v_file_to, $v_data);
                }
                @fclose($v_file_from);
                @fclose($v_file_to);
            }
            // ----- File to open if the local copy
            $v_filename = $this->_temp_tarname;
        } else {
            // ----- File to open if the normal Tar file
            $v_filename = $this->_tarname;
        }
        $this->_file = @fopen($v_filename, "rb");
        if ($this->_file == 0) {
            $this->_error('Unable to open in read mode \'' . $v_filename . '\'');
            return false;
        }
        return true;
    }