PHP Class Symfony\Component\HttpKernel\Client

Author: Fabien Potencier ([email protected])
Inheritance: extends Symfony\Component\BrowserKit\Client
Mostra file Open project: symfony/symfony Class Usage Examples

Protected Properties

Property Type Description
$kernel

Public Methods

Method Description
__construct ( Symfony\Component\HttpKernel\HttpKernelInterface $kernel, array $server = [], Symfony\Component\BrowserKit\History $history = null, Symfony\Component\BrowserKit\CookieJar $cookieJar = null ) Constructor.
getRequest ( ) : Request | null
getResponse ( ) : Response | null

Protected Methods

Method Description
doRequest ( Request $request ) : Response Makes a request.
filterFiles ( array $files ) : array Filters an array of files.
filterRequest ( Symfony\Component\BrowserKit\Request $request ) : Request Converts the BrowserKit request to a HttpKernel request.
filterResponse ( Response $response ) : Symfony\Component\BrowserKit\Response Converts the HttpKernel response to a BrowserKit response.
getHandleScript ( )
getScript ( Request $request ) : string Returns the script to execute when the request must be insulated.

Method Details

__construct() public method

Constructor.
public __construct ( Symfony\Component\HttpKernel\HttpKernelInterface $kernel, array $server = [], Symfony\Component\BrowserKit\History $history = null, Symfony\Component\BrowserKit\CookieJar $cookieJar = null )
$kernel Symfony\Component\HttpKernel\HttpKernelInterface An HttpKernel instance
$server array The server parameters (equivalent of $_SERVER)
$history Symfony\Component\BrowserKit\History A History instance to store the browser history
$cookieJar Symfony\Component\BrowserKit\CookieJar A CookieJar instance to store the cookies

doRequest() protected method

Makes a request.
protected doRequest ( Request $request ) : Response
$request Symfony\Component\HttpFoundation\Request A Request instance
return Symfony\Component\HttpFoundation\Response A Response instance

filterFiles() protected method

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.
See also: UploadedFile
protected filterFiles ( array $files ) : array
$files array An array of files
return array An array with all uploaded files marked as already moved

filterRequest() protected method

Converts the BrowserKit request to a HttpKernel request.
protected filterRequest ( Symfony\Component\BrowserKit\Request $request ) : Request
$request Symfony\Component\BrowserKit\Request A DomRequest instance
return Symfony\Component\HttpFoundation\Request A Request instance

filterResponse() protected method

Converts the HttpKernel response to a BrowserKit response.
protected filterResponse ( Response $response ) : Symfony\Component\BrowserKit\Response
$response Symfony\Component\HttpFoundation\Response A Response instance
return Symfony\Component\BrowserKit\Response A DomResponse instance

getHandleScript() protected method

protected getHandleScript ( )

getRequest() public method

public getRequest ( ) : Request | null
return Symfony\Component\HttpFoundation\Request | null A Request instance

getResponse() public method

public getResponse ( ) : Response | null
return Symfony\Component\HttpFoundation\Response | null A Response instance

getScript() protected method

Returns the script to execute when the request must be insulated.
protected getScript ( Request $request ) : string
$request Symfony\Component\HttpFoundation\Request A Request instance
return string

Property Details

$kernel protected_oe property

protected $kernel