FileAccess Orion

Client extends HttpKernelBrowser
in package

Client simulates a browser and makes requests to a Kernel object.

Tags
deprecated

since Symfony 4.3, use KernelBrowser instead.

Table of Contents

$kernel  : mixed
$catchExceptions  : mixed
$hasPerformedRequest  : mixed
$profiler  : mixed
$reboot  : mixed
__construct()  : mixed
{@inheritdoc}
catchExceptions()  : mixed
Sets whether to catch exceptions when the kernel is handling a request.
disableReboot()  : mixed
Disables kernel reboot between requests.
enableProfiler()  : mixed
Enables the profiler for the very next request.
enableReboot()  : mixed
Enables kernel reboot between requests.
getContainer()  : ContainerInterface|null
Returns the container.
getKernel()  : KernelInterface
Returns the kernel.
getProfile()  : Profile|false
Gets the profile associated with the current Response.
getRequest()  : Request
getRequest()  : Request
getResponse()  : Response
getResponse()  : Response
doRequest()  : Response
{@inheritdoc}
doRequestInProcess()  : Response
{@inheritdoc}
filterFiles()  : array<string|int, mixed>
Filters an array of files.
filterRequest()  : Request
Converts the BrowserKit request to a HttpKernel request.
filterResponse()  : Response
Converts the HttpKernel response to a BrowserKit response.
getHandleScript()  : mixed
getScript()  : string
Returns the script to execute when the request must be insulated.

Properties

$catchExceptions

private mixed $catchExceptions = true

$hasPerformedRequest

private mixed $hasPerformedRequest = false

$profiler

private mixed $profiler = false

$reboot

private mixed $reboot = true

Methods

__construct()

{@inheritdoc}

public __construct(KernelInterface $kernel[, array<string|int, mixed> $server = [] ][, History $history = null ][, CookieJar $cookieJar = null ]) : mixed
Parameters
$kernel : KernelInterface
$server : array<string|int, mixed> = []
$history : History = null
$cookieJar : CookieJar = null
Return values
mixed

catchExceptions()

Sets whether to catch exceptions when the kernel is handling a request.

public catchExceptions(bool $catchExceptions) : mixed
Parameters
$catchExceptions : bool

Whether to catch exceptions

Return values
mixed

disableReboot()

Disables kernel reboot between requests.

public disableReboot() : mixed

By default, the Client reboots the Kernel for each request. This method allows to keep the same kernel across requests.

Return values
mixed

enableProfiler()

Enables the profiler for the very next request.

public enableProfiler() : mixed

If the profiler is not enabled, the call to this method does nothing.

Return values
mixed

enableReboot()

Enables kernel reboot between requests.

public enableReboot() : mixed
Return values
mixed

getProfile()

Gets the profile associated with the current Response.

public getProfile() : Profile|false
Return values
Profile|false

A Profile instance

doRequestInProcess()

{@inheritdoc}

protected doRequestInProcess(Request $request) : Response
Parameters
$request : Request

A Request instance

Return values
Response

A Response instance

filterFiles()

Filters an array of files.

protected filterFiles(array<string|int, mixed> $files) : array<string|int, mixed>

This method created test instances of UploadedFile so that the move() method can be called on those instances.

If the size of a file is greater than the allowed size (from php.ini) then an invalid UploadedFile is returned with an error set to UPLOAD_ERR_INI_SIZE.

Parameters
$files : array<string|int, mixed>
Tags
see
UploadedFile
Return values
array<string|int, mixed>

An array with all uploaded files marked as already moved

filterRequest()

Converts the BrowserKit request to a HttpKernel request.

protected filterRequest(Request $request) : Request
Parameters
$request : Request
Return values
Request

A Request instance

filterResponse()

Converts the HttpKernel response to a BrowserKit response.

protected filterResponse(mixed $response) : Response
Parameters
$response : mixed
Return values
Response

A DomResponse instance

getHandleScript()

protected getHandleScript() : mixed
Return values
mixed

getScript()

Returns the script to execute when the request must be insulated.

protected getScript(Request $request) : string

It assumes that the autoloader is named 'autoload.php' and that it is stored in the same directory as the kernel (this is the case for the Symfony Standard Edition). If this is not your case, create your own client and override this method.

Parameters
$request : Request

A Request instance

Return values
string

The script content

Search results