BeforeZipCreatedEvent
extends Event
in package
This event is triggered before a archive is created when a user requested downloading a folder or multiple files.
By setting successful
to false the tar creation can be aborted and the download denied.
Tags
Table of Contents
Properties
- $directory : string
- $errorMessage : string|null
- $files : array<string|int, mixed>
- $folder : Folder|null
- $propagationStopped : bool
- $successful : bool
Methods
- __construct() : mixed
- Compatibility constructor
- getDirectory() : string
- getErrorMessage() : string|null
- Get the error message, if any
- getFiles() : array<string|int, mixed>
- getFolder() : Folder|null
- isPropagationStopped() : bool
- {@inheritDoc}
- isSuccessful() : bool
- setErrorMessage() : void
- setSuccessful() : void
- Set if the event was successful
- stopPropagation() : void
- Stops the propagation of the event to further event listeners
Properties
$directory
private
string
$directory
$errorMessage
private
string|null
$errorMessage
= null
$files
private
array<string|int, mixed>
$files
$folder
private
Folder|null
$folder
= null
$propagationStopped
private
bool
$propagationStopped
= false
Tags
$successful
private
bool
$successful
= true
Methods
__construct()
Compatibility constructor
public
__construct(string|Folder $directory, array<int, string> $files) : mixed
Parameters
- $directory : string|Folder
- $files : array<int, string>
Tags
getDirectory()
public
getDirectory() : string
Tags
Return values
stringgetErrorMessage()
Get the error message, if any
public
getErrorMessage() : string|null
Tags
Return values
string|nullgetFiles()
public
getFiles() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed>getFolder()
public
getFolder() : Folder|null
Tags
Return values
Folder|nullisPropagationStopped()
{@inheritDoc}
public
isPropagationStopped() : bool
Tags
Return values
boolisSuccessful()
public
isSuccessful() : bool
Tags
Return values
boolsetErrorMessage()
public
setErrorMessage(string $errorMessage) : void
Parameters
- $errorMessage : string
Tags
setSuccessful()
Set if the event was successful
public
setSuccessful(bool $successful) : void
Parameters
- $successful : bool
Tags
stopPropagation()
Stops the propagation of the event to further event listeners
public
stopPropagation() : void