FileDumpController

Class FileDumpController

Table of Contents

Properties

$eventDispatcher  : EventDispatcherInterface
$resourceFactory  : ResourceFactory
$responseFactory  : ResponseFactoryInterface

Methods

__construct()  : mixed
dumpAction()  : ResponseInterface
Main method to dump a file
applyContentSecurityPolicy()  : ResponseInterface
Applies hard-coded content-security-policy (CSP) for file to be dumped.
buildParametersFromRequest()  : array<string|int, mixed>
createFileObjectByParameters()  : File|FileReference|ProcessedFile|null
isFileValid()  : bool
isTokenValid()  : bool

Properties

$eventDispatcher

protected EventDispatcherInterface $eventDispatcher

$responseFactory

protected ResponseFactoryInterface $responseFactory

Methods

__construct()

public __construct(EventDispatcherInterface $eventDispatcher, ResourceFactory $resourceFactory, ResponseFactoryInterface $responseFactory) : mixed
Parameters
$eventDispatcher : EventDispatcherInterface
$resourceFactory : ResourceFactory
$responseFactory : ResponseFactoryInterface

dumpAction()

Main method to dump a file

public dumpAction(ServerRequestInterface $request) : ResponseInterface
Parameters
$request : ServerRequestInterface
Tags
throws
InvalidArgumentException
throws
RuntimeException
throws
FileDoesNotExistException
throws
UnexpectedValueException
Return values
ResponseInterface

applyContentSecurityPolicy()

Applies hard-coded content-security-policy (CSP) for file to be dumped.

protected applyContentSecurityPolicy(ResourceInterface $file, ResponseInterface $response) : ResponseInterface
Parameters
$file : ResourceInterface
$response : ResponseInterface
Return values
ResponseInterface

buildParametersFromRequest()

protected buildParametersFromRequest(ServerRequestInterface $request) : array<string|int, mixed>
Parameters
$request : ServerRequestInterface
Return values
array<string|int, mixed>

isTokenValid()

protected isTokenValid(array<string|int, mixed> $parameters, ServerRequestInterface $request) : bool
Parameters
$parameters : array<string|int, mixed>
$request : ServerRequestInterface
Return values
bool

        
On this page

Search results