當前位置: 首頁>>代碼示例>>PHP>>正文


PHP RequestInterface::getUsername方法代碼示例

本文整理匯總了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());
     }
 }
開發者ID:Ryu0621,項目名稱:SaNaVi,代碼行數:10,代碼來源:PhpStreamRequestFactory.php

示例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';
 }
開發者ID:nuxeo,項目名稱:nuxeo-automation-php-client,代碼行數:13,代碼來源:NuxeoRequest.php

示例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());
     }
 }
開發者ID:carlyns,項目名稱:RESUSblog,代碼行數:17,代碼來源:PhpStreamRequestFactory.php

示例4: getUsername

 /**
  * Get the username to pass in the URL if set
  *
  * @return string|null
  */
 public function getUsername()
 {
     return $this->wrapped->getUsername();
 }
開發者ID:cosmorogers,項目名稱:http-mock,代碼行數:9,代碼來源:UnifiedRequest.php


注:本文中的Guzzle\Http\Message\RequestInterface::getUsername方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。