public function file($source, $destination)
    {
        settype($source, 'array');

        $this->set($destination, true);

        $added = 0;

        foreach ($source as $file) {
            $added += (int) $this->zip->addFile($file, basename($file));
        }

        $this->zip->close();
        return count($source) == $added;
    }
public function file($source, $destination)
    {
        settype($source, 'array');

        $this->set($destination, true);

        $added = 0;

        foreach ($source as $file) {
            $added += (int) $this->zip->addFile($file, basename($file));
        }

        $this->zip->close();
        return count($source) == $added;
    }
public function file ( $ source , $ destination ) { settype ( $ source , 'array' ) ; $ this -> set ( $ destination , true ) ; $ added = 0 ; foreach ( $ source as $ file ) { $ added += ( int ) $ this -> zip -> addFile ( $ file , basename ( $ file ) ) ; } $ this -> zip -> close ( ) ; return count ( $ source ) == $ added ; }
Create a ZIP archive
@param array|string $source
@param string $destination
@return bool
Create a ZIP archive