Exports products as ZIP archives.

This \FeaturePhp\Exporter\Exporter takes a product's generated files and bundles them up in a ZIP archive on the server. To download the file, see \FeaturePhp\Exporter\DownloadZipExporter.

package Default
inherited_from \FeaturePhp\Exporter\Exporter

 Methods

Creates a ZIP exporter.

__construct(string $target) 

Parameters

$target

string

Exports a product as a ZIP archive.

export(\FeaturePhp\ProductLine\Product $product) 

Every generated file is added to the archive at its target path. If there are no files, a NOTICE file is generated because \ZipArchive does not support saving an empty ZIP archive. The archive's root directory has the product line's name.

inherited_from \FeaturePhp\Exporter\Exporter::export()

Parameters

$product

\FeaturePhp\ProductLine\Product

Exports a product.

export(\FeaturePhp\ProductLine\Product $product) 
Inherited

The implementation is expected to have some side effect, e.g. downloading a file.

Parameters

$product

\FeaturePhp\ProductLine\Product

Closes a ZIP archive.

close(\ZipArchive $zip) 

Parameters

$zip

\ZipArchive

Opens and returns the targeted ZIP archive.

open() : \ZipArchive

Returns

\ZipArchive

 Properties

 

the ZIP archive target file on the server

$target : string

Default