ModifyFileDumpEvent implements StoppableEventInterface
FinalYes
Event that is triggered when a file should be dumped to the browser, allowing to perform custom security/access checks when accessing a file through a direct link, and returning an alternative Response.
It is also possible to replace the file during this event, but not setting a response.
As soon as a custom Response is added, the propagation is stopped.
Table of Contents
Interfaces
- StoppableEventInterface
Methods
- __construct() : mixed
- getFile() : ResourceInterface
- getRequest() : ServerRequestInterface
- getResponse() : ResponseInterface|null
- isPropagationStopped() : bool
- setFile() : void
- setResponse() : void
Methods
__construct()
public
__construct(ResourceInterface $file, ServerRequestInterface $request) : mixed
Parameters
- $file : ResourceInterface
- $request : ServerRequestInterface
getFile()
public
getFile() : ResourceInterface
Return values
ResourceInterfacegetRequest()
public
getRequest() : ServerRequestInterface
Return values
ServerRequestInterfacegetResponse()
public
getResponse() : ResponseInterface|null
Return values
ResponseInterface|nullisPropagationStopped()
public
isPropagationStopped() : bool
Return values
boolsetFile()
public
setFile(ResourceInterface $file) : void
Parameters
- $file : ResourceInterface
setResponse()
public
setResponse(ResponseInterface $response) : void
Parameters
- $response : ResponseInterface