本文整理汇总了PHP中Symfony\Component\HttpKernel\Client::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Client::__construct方法的具体用法?PHP Client::__construct怎么用?PHP Client::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Symfony\Component\HttpKernel\Client
的用法示例。
在下文中一共展示了Client::__construct方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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);
}
示例2: __construct
/**
* Constructor.
*
* @param \Codeception\Module\Laravel4 $module
*/
public function __construct($module)
{
$this->module = $module;
$this->initialize();
parent::__construct($this->kernel);
// Parent constructor defaults to not following redirects
$this->followRedirects(true);
}
示例3: __construct
/**
* Constructor.
*
* @param \Symfony\Component\HttpKernel\Kernel $kernel A booted HttpKernel instance
* @param array $services An injected services
* @param boolean $rebootable
*/
public function __construct(\Symfony\Component\HttpKernel\Kernel $kernel, array $services = [], $rebootable = true)
{
parent::__construct($kernel);
$this->followRedirects(true);
$this->rebootable = (bool) $rebootable;
$this->persistentServices = $services;
$this->rebootKernel();
}
示例4: __construct
/**
* Constructor.
* @param \Codeception\Module\Laravel5 $module
*/
public function __construct($module)
{
$this->module = $module;
$this->initialize();
$components = parse_url($this->app['config']->get('app.url', 'http://localhost'));
$host = isset($components['host']) ? $components['host'] : 'localhost';
parent::__construct($this->app, ['HTTP_HOST' => $host]);
// Parent constructor defaults to not following redirects
$this->followRedirects(true);
}
示例5: __construct
/**
* 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();
$url = $this->app->config->get('app.url', 'http://localhost');
$this->app->instance('request', Request::createFromBase(SyfmonyRequest::create($url)));
$components = parse_url($url);
$host = isset($components['host']) ? $components['host'] : 'localhost';
parent::__construct($this, ['HTTP_HOST' => $host]);
$this->followRedirects(true);
// Parent constructor sets this to false by default
}
示例6: __construct
/**
* Constructor.
*
* @param \Codeception\Module\Laravel5 $module
*/
public function __construct($module)
{
$this->module = $module;
$this->exceptionHandlingDisabled = $this->module->config['disable_exception_handling'];
$this->middlewareDisabled = $this->module->config['disable_middleware'];
$this->eventsDisabled = $this->module->config['disable_events'];
$this->initialize();
$components = parse_url($this->app['config']->get('app.url', 'http://localhost'));
if (array_key_exists('url', $this->module->config)) {
$components = parse_url($this->module->config['url']);
}
$host = isset($components['host']) ? $components['host'] : 'localhost';
parent::__construct($this->app, ['HTTP_HOST' => $host]);
// Parent constructor defaults to not following redirects
$this->followRedirects(true);
}
示例7: __construct
/**
* Constructor.
*
* @param Application $app
*/
public function __construct(Application $app)
{
$this->app = $app;
parent::__construct($this);
}
示例8: __construct
/**
* {@inheritdoc}
*/
public function __construct(KernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
{
parent::__construct($kernel, $server, $history, $cookieJar);
}
示例9: __construct
/**
* Constructor.
*
* @param HttpKernelInterface $kernel A Kernel instance
* @param array $server The server parameters (equivalent of $_SERVER)
* @param History $history A History instance to store the browser history
* @param CookieJar $cookieJar A CookieJar instance to store the cookies
*/
public function __construct(HttpKernelInterface $kernel, array $server = array(), History $history = null, CookieJar $cookieJar = null)
{
parent::__construct($kernel, $server, $history, $cookieJar);
$this->container = $kernel->getContainer();
}