Archive extends Archive
Table of Contents
Constants
- MOD_ZIP_HEADER_NAME = 'X-Archive-Files'
Methods
- __construct() : mixed
- Archive constructor.
- addEntry() : void
- Add one entry. in current archive.
- createByObjects() : static
- createFromFolder() : static
- Creates archive which will be copy of folder.
- isEmpty() : bool
- Returns true if the archive does not have entries.
- send() : void
- Sends content to output stream and sets necessary headers.
Constants
MOD_ZIP_HEADER_NAME
public
mixed
MOD_ZIP_HEADER_NAME
= 'X-Archive-Files'
Methods
__construct()
Archive constructor.
public
__construct(string $name) : mixed
Parameters
- $name : string
-
Archive name.
addEntry()
Add one entry. in current archive.
public
addEntry(ArchiveEntry|EntryInterface $archiveEntry) : void
Parameters
- $archiveEntry : ArchiveEntry|EntryInterface
-
Entry for archive.
createByObjects()
public
static createByObjects(string $name, ObjectCollection $objectCollection, int $userId) : static
Parameters
- $name : string
- $objectCollection : ObjectCollection
- $userId : int
Return values
staticcreateFromFolder()
Creates archive which will be copy of folder.
public
static createFromFolder(Folder $folder, SecurityContext $securityContext) : static
Parameters
- $folder : Folder
-
Target folder.
- $securityContext : SecurityContext
-
Security context to getting items.
Return values
staticisEmpty()
Returns true if the archive does not have entries.
public
isEmpty() : bool
Return values
boolsend()
Sends content to output stream and sets necessary headers.
public
send() : void