本文整理汇总了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();
}