src/Slashworks/AppBundle/Resources/private/api/zip.lib.php
public function finalize() {
        if (!$this->isFinalized) {
            if (strlen($this->streamFilePath) > 0) {
                $this->closeStream();
            }
            $cd = implode("", $this->cdRec);

            $cdRecSize = pack("v", sizeof($this->cdRec));
            $cdRec = $cd . self::ZIP_END_OF_CENTRAL_DIRECTORY
                     . $cdRecSize . $cdRecSize
                     . pack("VV", strlen($cd), $this->offset);
            if (!empty($this->zipComment)) {
                $cdRec .= pack("v", strlen($this->zipComment)) . $this->zipComment;
            } else {
                $cdRec .= "\x00\x00";
            }

            $this->zipwrite($cdRec);

            $this->isFinalized = TRUE;
            $this->cdRec = NULL;

            return TRUE;
        }
        return FALSE;
    }
public function finalize() {
        if (!$this->isFinalized) {
            if (strlen($this->streamFilePath) > 0) {
                $this->closeStream();
            }
            $cd = implode("", $this->cdRec);

            $cdRecSize = pack("v", sizeof($this->cdRec));
            $cdRec = $cd . self::ZIP_END_OF_CENTRAL_DIRECTORY
                     . $cdRecSize . $cdRecSize
                     . pack("VV", strlen($cd), $this->offset);
            if (!empty($this->zipComment)) {
                $cdRec .= pack("v", strlen($this->zipComment)) . $this->zipComment;
            } else {
                $cdRec .= "\x00\x00";
            }

            $this->zipwrite($cdRec);

            $this->isFinalized = TRUE;
            $this->cdRec = NULL;

            return TRUE;
        }
        return FALSE;
    }
public function finalize ( ) { if ( ! $ this -> isFinalized ) { if ( strlen ( $ this -> streamFilePath ) > 0 ) { $ this -> closeStream ( ) ; } $ cd = implode ( "" , $ this -> cdRec ) ; $ cdRecSize = pack ( "v" , sizeof ( $ this -> cdRec ) ) ; $ cdRec = $ cd . self :: ZIP_END_OF_CENTRAL_DIRECTORY . $ cdRecSize . $ cdRecSize . pack ( "VV" , strlen ( $ cd ) , $ this -> offset ) ; if ( ! empty ( $ this -> zipComment ) ) { $ cdRec .= pack ( "v" , strlen ( $ this -> zipComment ) ) . $ this -> zipComment ; } else { $ cdRec .= "\x00\x00" ; } $ this -> zipwrite ( $ cdRec ) ; $ this -> isFinalized = TRUE ; $ this -> cdRec = NULL ; return TRUE ; } return FALSE ; }
Close the archive.
A closed archive can no longer have new files added to it.

@return bool $success
Close the archive . A closed archive can no longer have new files added to it .