src/ZipStreamer.php
public function send() {
    if (!isset($this->files[$this->sent])) {
      return FALSE;
    }

    $file = $this->files[$this->sent];

    // Local header
    $local = $file->genLocal(self::ZIP_VERSION, $this->dosStamp);
    $this->output($local);

    // Body
    $file->hasDeflation() ? $this->outputDeflated($file) : $this->outputRaw($file);

    // Data descriptor
    $dataDescriptor = $file->isSmooth() ? $file->genDataDescriptor() : '';
    $this->output($dataDescriptor);

    $file->setLocalOffset($this->localOffset);
    $this->localOffset += strlen($local) + $file->getDeflatedSize() + strlen($dataDescriptor);

    // Central header (not output, see flush)
    $file->genCentral(self::ZIP_VERSION, $this->dosStamp);
    $this->centralLength += strlen($file->getCentral());

    $this->sent++;
    return TRUE;
  }
public function send() {
    if (!isset($this->files[$this->sent])) {
      return FALSE;
    }

    $file = $this->files[$this->sent];

    // Local header
    $local = $file->genLocal(self::ZIP_VERSION, $this->dosStamp);
    $this->output($local);

    // Body
    $file->hasDeflation() ? $this->outputDeflated($file) : $this->outputRaw($file);

    // Data descriptor
    $dataDescriptor = $file->isSmooth() ? $file->genDataDescriptor() : '';
    $this->output($dataDescriptor);

    $file->setLocalOffset($this->localOffset);
    $this->localOffset += strlen($local) + $file->getDeflatedSize() + strlen($dataDescriptor);

    // Central header (not output, see flush)
    $file->genCentral(self::ZIP_VERSION, $this->dosStamp);
    $this->centralLength += strlen($file->getCentral());

    $this->sent++;
    return TRUE;
  }
public function send ( ) { if ( ! isset ( $ this -> files [ $ this -> sent ] ) ) { return FALSE ; } $ file = $ this -> files [ $ this -> sent ] ; // Local header $ local = $ file -> genLocal ( self :: ZIP_VERSION , $ this -> dosStamp ) ; $ this -> output ( $ local ) ; // Body $ file -> hasDeflation ( ) ? $ this -> outputDeflated ( $ file ) : $ this -> outputRaw ( $ file ) ; // Data descriptor $ dataDescriptor = $ file -> isSmooth ( ) ? $ file -> genDataDescriptor ( ) : '' ; $ this -> output ( $ dataDescriptor ) ; $ file -> setLocalOffset ( $ this -> localOffset ) ; $ this -> localOffset += strlen ( $ local ) + $ file -> getDeflatedSize ( ) + strlen ( $ dataDescriptor ) ; // Central header (not output, see flush) $ file -> genCentral ( self :: ZIP_VERSION , $ this -> dosStamp ) ; $ this -> centralLength += strlen ( $ file -> getCentral ( ) ) ; $ this -> sent ++ ; return TRUE ; }
Sends the next file in the queue to the output interface.

@returns TRUE if the file was sent, FALSE if the queue was empty.
Sends the next file in the queue to the output interface .