本文整理汇总了PHP中Embed\Request::createRequest方法的典型用法代码示例。如果您正苦于以下问题:PHP Request::createRequest方法的具体用法?PHP Request::createRequest怎么用?PHP Request::createRequest使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Embed\Request
的用法示例。
在下文中一共展示了Request::createRequest方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* {@inheritdoc}
*/
public function __construct(Request $request, array $config = null)
{
$this->request = $request;
if (isset($config['adapter']['config'])) {
$this->config = array_replace($this->config, $config['adapter']['config']);
}
if (isset($config['providers'])) {
$this->providersConfig = $config['providers'];
}
if (isset($config['image']['class'])) {
$this->imageClass = $config['image']['class'];
}
if (isset($config['image']['config'])) {
$this->imageConfig = $config['image']['config'];
}
$this->run();
if ($request->url->getUrl() !== $this->url) {
$subRequest = $request->createRequest($this->url);
if ($subRequest->isValid()) {
$this->request = $subRequest;
$this->run();
} else {
$this->url = $request->url->getUrl();
}
}
}