Microweber\Utils\Unzip::_load_files_by_signatures PHP Метод

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

--------------------------------------------------------------------
private _load_files_by_signatures ( &$fh, $stop_on_file = false )
    private function _load_files_by_signatures(&$fh, $stop_on_file = false)
    {
        fseek($fh, 0);
        $return = false;
        for (;;) {
            $details = $this->_get_file_header($fh);
            if (!$details) {
                $this->set_debug('Invalid signature. Trying to verify if is old style Data Descriptor...');
                fseek($fh, 12 - 4, SEEK_CUR);
                // 12: Data descriptor - 4: Signature (that will be read again)
                $details = $this->_get_file_header($fh);
            }
            if (!$details) {
                $this->set_debug('Still invalid signature. Probably reached the end of the file.');
                break;
            }
            $filename = $details['file_name'];
            $this->compressed_list[$filename] = $details;
            $return = true;
            if (strtolower($stop_on_file) == strtolower($filename)) {
                break;
            }
        }
        return $return;
    }