src/Zip.php
protected function header2fileinfo($header)
    {
        $fileinfo = new FileInfo();
        $fileinfo->setSize($header['size']);
        $fileinfo->setCompressedSize($header['compressed_size']);
        $fileinfo->setMtime($header['mtime']);
        $fileinfo->setComment($header['comment']);
        $fileinfo->setIsdir($header['external'] == 0x41FF0010 || $header['external'] == 16);

        if(isset($header['extradata']['utf8path'])) {
            $fileinfo->setPath($header['extradata']['utf8path']);
        } else {
            $fileinfo->setPath($this->cpToUtf8($header['filename']));
        }

        if(isset($header['extradata']['utf8comment'])) {
            $fileinfo->setComment($header['extradata']['utf8comment']);
        } else {
            $fileinfo->setComment($this->cpToUtf8($header['comment']));
        }

        return $fileinfo;
    }
protected function header2fileinfo($header)
    {
        $fileinfo = new FileInfo();
        $fileinfo->setSize($header['size']);
        $fileinfo->setCompressedSize($header['compressed_size']);
        $fileinfo->setMtime($header['mtime']);
        $fileinfo->setComment($header['comment']);
        $fileinfo->setIsdir($header['external'] == 0x41FF0010 || $header['external'] == 16);

        if(isset($header['extradata']['utf8path'])) {
            $fileinfo->setPath($header['extradata']['utf8path']);
        } else {
            $fileinfo->setPath($this->cpToUtf8($header['filename']));
        }

        if(isset($header['extradata']['utf8comment'])) {
            $fileinfo->setComment($header['extradata']['utf8comment']);
        } else {
            $fileinfo->setComment($this->cpToUtf8($header['comment']));
        }

        return $fileinfo;
    }
protected function header2fileinfo ( $ header ) { $ fileinfo = new FileInfo ( ) ; $ fileinfo -> setSize ( $ header [ 'size' ] ) ; $ fileinfo -> setCompressedSize ( $ header [ 'compressed_size' ] ) ; $ fileinfo -> setMtime ( $ header [ 'mtime' ] ) ; $ fileinfo -> setComment ( $ header [ 'comment' ] ) ; $ fileinfo -> setIsdir ( $ header [ 'external' ] == 0x41FF0010 || $ header [ 'external' ] == 16 ) ; if ( isset ( $ header [ 'extradata' ] [ 'utf8path' ] ) ) { $ fileinfo -> setPath ( $ header [ 'extradata' ] [ 'utf8path' ] ) ; } else { $ fileinfo -> setPath ( $ this -> cpToUtf8 ( $ header [ 'filename' ] ) ) ; } if ( isset ( $ header [ 'extradata' ] [ 'utf8comment' ] ) ) { $ fileinfo -> setComment ( $ header [ 'extradata' ] [ 'utf8comment' ] ) ; } else { $ fileinfo -> setComment ( $ this -> cpToUtf8 ( $ header [ 'comment' ] ) ) ; } return $ fileinfo ; }
Create fileinfo object from header data

@param $header
@return FileInfo
Create fileinfo object from header data