PHP Class Symfony\Component\HttpKernel\Client

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

Protected Properties

Свойство Type Description
$kernel

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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 méthode

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 méthode

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

filterFiles() protected méthode

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
Résultat array An array with all uploaded files marked as already moved

filterRequest() protected méthode

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

filterResponse() protected méthode

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

getHandleScript() protected méthode

protected getHandleScript ( )

getRequest() public méthode

public getRequest ( ) : Request | null
Résultat Symfony\Component\HttpFoundation\Request | null A Request instance

getResponse() public méthode

public getResponse ( ) : Response | null
Résultat Symfony\Component\HttpFoundation\Response | null A Response instance

getScript() protected méthode

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

Property Details

$kernel protected_oe property

protected $kernel