src/Slashworks/AppBundle/Resources/private/api/zip.lib.php
public function addStreamData($data) {
        if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
            return FALSE;
        }

        $length = fwrite($this->streamData, $data, strlen($data));
        if ($length != strlen($data)) {
            throw new Exception("File IO: Error writing; Length mismatch: Expected " . strlen($data) . " bytes, wrote " . ($length === FALSE ? "NONE!" : $length));
        }
        $this->streamFileLength += $length;

        return $length;
    }
public function addStreamData($data) {
        if ($this->isFinalized || strlen($this->streamFilePath) == 0) {
            return FALSE;
        }

        $length = fwrite($this->streamData, $data, strlen($data));
        if ($length != strlen($data)) {
            throw new Exception("File IO: Error writing; Length mismatch: Expected " . strlen($data) . " bytes, wrote " . ($length === FALSE ? "NONE!" : $length));
        }
        $this->streamFileLength += $length;

        return $length;
    }
public function addStreamData ( $ data ) { if ( $ this -> isFinalized || strlen ( $ this -> streamFilePath ) == 0 ) { return FALSE ; } $ length = fwrite ( $ this -> streamData , $ data , strlen ( $ data ) ) ; if ( $ length != strlen ( $ data ) ) { throw new Exception ( "File IO: Error writing; Length mismatch: Expected " . strlen ( $ data ) . " bytes, wrote " . ( $ length === FALSE ? "NONE!" : $ length ) ) ; } $ this -> streamFileLength += $ length ; return $ length ; }
Add data to the open stream.

@param string $data
@throws Exception Throws an exception in case of errors
@return mixed length in bytes added or FALSE if the archive is finalized or there are no open stream.
Add data to the open stream .