本文整理匯總了PHP中Guzzle\Http\Message\RequestInterface::getUsername方法的典型用法代碼示例。如果您正苦於以下問題:PHP RequestInterface::getUsername方法的具體用法?PHP RequestInterface::getUsername怎麽用?PHP RequestInterface::getUsername使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Guzzle\Http\Message\RequestInterface
的用法示例。
在下文中一共展示了RequestInterface::getUsername方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setUrl
protected function setUrl(RequestInterface $request)
{
$this->url = $request->getUrl(true);
if ($request->getUsername()) {
$this->url->setUsername($request->getUsername());
}
if ($request->getPassword()) {
$this->url->setPassword($request->getPassword());
}
}
示例2: __construct
public function __construct(RequestInterface $request)
{
$url = Url::factory($request->getUrl());
$url->setUsername($request->getUsername());
$url->setPassword($request->getPassword());
$this->url = $url;
$this->request = $request;
$this->finalRequest = array();
$this->method = 'POST';
$this->iterationNumber = 0;
$this->blobList = null;
$this->NXVoidOperation = 'true';
}
示例3: setUrl
/**
* Set the URL to use with the factory
*
* @param RequestInterface $request Request that owns the URL
*/
protected function setUrl(RequestInterface $request)
{
$this->url = $request->getUrl(true);
// Check for basic Auth username
if ($request->getUsername()) {
$this->url->setUsername($request->getUsername());
}
// Check for basic Auth password
if ($request->getPassword()) {
$this->url->setPassword($request->getPassword());
}
}
示例4: getUsername
/**
* Get the username to pass in the URL if set
*
* @return string|null
*/
public function getUsername()
{
return $this->wrapped->getUsername();
}