Contents

Backend\Models\ExportModel\EncodesZip

Overview

EncodesZip format for export


Protected Properties

protected array $exportedFiles

exportedFiles collects file paths for ZIP packaging. Format: ['files/name.jpg' => '/absolute/local/path.jpg']

protected array $exportedFileNames

exportedFileNames tracks used filenames to handle collisions


Public Methods

public addExportedFile()

public addExportedFile($relativePath, $localPath): void

addExportedFile registers a file for inclusion in the exported ZIP archive

Protected Methods

protected encodeFileModel()

protected encodeFileModel($file): void

encodeFileModel returns a unique file path and registers the file for ZIP export

protected encodeFileRelation()

protected encodeFileRelation($model, $attr): void

encodeFileRelation returns file path(s) for a file attachment relation and registers the files for inclusion in the exported ZIP archive

protected processExportDataAsZip()

protected processExportDataAsZip($zipPath, $dataFilePath, $dataFileName): void

processExportDataAsZip packages the data file and exported files into a single ZIP archive