Archive
\Bitrix\Main\Engine\Response\Zip\Archive methods for handling archives.
When you have web-server NGINX, you can use the extension mod_zip to create archives quickly without additional load on PHP.
use \Bitrix\Main\Engine\Response; $archive = new Response\Zip\Archive('archive.zip'); $archive->addEntry(Response\Zip\ArchiveEntry::createFromFileId($fileId)); $archive->addEntry(Response\Zip\ArchiveEntry::createFromFileId($anotherFileId));
Methods
Method | Description | Available from version |
---|---|---|
__construct( $name ) | Constructor methods. Parameters:
| |
addEntry( \Bitrix\Main\Engine\Response\Zip\ArchiveEntry $archiveEntry ) | Adding of [link=]element[/link] into archive. | |
isEmpty( ) | Returns true, when archive is not empty. |
© «Bitrix24», 2001-2024