本文整理汇总了PHP中Psr\Http\Message\ServerRequestInterface::getQueryParam方法的典型用法代码示例。如果您正苦于以下问题:PHP ServerRequestInterface::getQueryParam方法的具体用法?PHP ServerRequestInterface::getQueryParam怎么用?PHP ServerRequestInterface::getQueryParam使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Psr\Http\Message\ServerRequestInterface
的用法示例。
在下文中一共展示了ServerRequestInterface::getQueryParam方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Counstrictor
*
* @param ServerRequestInterface $request Request instance.
*/
public function __construct(ServerRequestInterface $request)
{
$this->uri = $request->getUri();
$this->page = $request->getQueryParam('page');
$this->sortingKey = $request->getQueryParam('key');
$this->sortingType = $request->getQueryParam('type');
$this->searchQuery = $request->getQueryParam('search');
}
示例2: loginForm
/**
*
*/
public function loginForm(ServerRequestInterface $request, ResponseInterface $response)
{
parent::preparePage();
$url_Resume = $request->getQueryParam('resume');
if (!$url_Resume) {
$url_Resume = Proxy::getUrlRoot();
}
$this->template->using('login');
$this->importView("Auth:login as content");
$this->template->setData(['tokenName' => 'token-name', 'url_Authenticate' => Proxy::getUrlRoot() . "/auth/login", 'url_Resume' => $url_Resume, 'text_PlaceholderUsername' => 'Username', 'text_PlaceholderPassword' => 'Password', 'text_Login' => 'Login']);
return parent::withBody($response);
}