Zipper
class Zipper implements WriterInterface (View source)
Class that generate a ZIP archive containing the package files.
Properties
| protected string | $zipFilename | The absolute path to the ZIP archive to be created. | |
| protected string | $rootDirectory | The root directory inside the ZIP archive (empty string to not create a main directory inside the ZIP archive). | |
| protected OutputInterface | $output | ||
| protected Filesystem | $fs | ||
| protected array | $directoriesToAdd | ||
| protected array | $filesToAdd | 
Methods
Initialize the instance.
Called after all the files have been processed succesfully.
Create the ZIP archive.
Create the root directory inside the archive (if specified), and returns the prefix for further files/directoryes added to the archive.
Add a directory to a ZIP archive.
Add a directory to a ZIP archive.
Details
        
                            
    __construct(string $zipFilename, string $rootDirectory, OutputInterface $output, Filesystem $fs)
        
    
    Initialize the instance.
        
                            $this
    add(PackerFile $file)
        
    
    Add a file/directory.
        
                            
    completed()
        
    
    Called after all the files have been processed succesfully.
        
                    protected        ZipArchive
    createZipArchive()
        
    
    Create the ZIP archive.
        
                    protected        
    addRootDirectory(ZipArchive $zipArchive)
        
    
    Create the root directory inside the archive (if specified), and returns the prefix for further files/directoryes added to the archive.
        
                    protected        
    addDirectory(ZipArchive $zipArchive, string $relativePath)
        
    
    Add a directory to a ZIP archive.
        
                    protected        
    addFile(ZipArchive $zipArchive, string $sourceFile, string $relativePath)
        
    
    Add a directory to a ZIP archive.