Symfony\Component\HttpKernel\Client::__construct PHP Method

__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
    public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
    {
        // These class properties must be set before calling the parent constructor, as it may depend on it.
        $this->kernel = $kernel;
        $this->followRedirects = false;

        parent::__construct($server, $history, $cookieJar);
    }

Usage Example

Esempio n. 1
0
 /**
  * Constructor.
  *
  * @param Application $app
  */
 public function __construct(Application $app)
 {
     $this->app = $app;
     $this->httpKernel = $this->app->make('Illuminate\\Contracts\\Http\\Kernel');
     $this->httpKernel->bootstrap();
     $this->app->boot();
     parent::__construct($this);
 }
All Usage Examples Of Symfony\Component\HttpKernel\Client::__construct