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


PHP Service::Url方法代碼示例

本文整理匯總了PHP中Service::Url方法的典型用法代碼示例。如果您正苦於以下問題:PHP Service::Url方法的具體用法?PHP Service::Url怎麽用?PHP Service::Url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Service的用法示例。


在下文中一共展示了Service::Url方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: Url

 /**
  * Returns the selected endpoint URL of this Service
  *
  * @param string $resource - a child resource. For example,
  *      passing 'servers' would return .../servers. Should *not* be
  *    prefixed with a slash (/).
  * @param array $args (optional) an array of key-value pairs for query
  *      strings to append to the URL
  * @returns string - the requested URL
  */
 public function Url($resource = '', $args = array())
 {
     $baseurl = parent::Url();
     if ($resource != '') {
         $baseurl = noslash($baseurl) . '/' . $resource;
     }
     if (!empty($args)) {
         $baseurl .= '?' . $this->MakeQueryString($args);
     }
     return $baseurl;
 }
開發者ID:aaronpburke,項目名稱:cron-backup-script,代碼行數:21,代碼來源:dns.php

示例2: Url

 /**
  * Returns the URL of the service, selected from the connection's
  * serviceCatalog
  */
 public function Url($param = array())
 {
     return noslash(parent::Url($param));
 }
開發者ID:aaronpburke,項目名稱:cron-backup-script,代碼行數:8,代碼來源:objectstore.php

示例3: __construct

 /**
  * Called when creating a new Compute service object
  *
  * _NOTE_ that the order of parameters for this is *different* from the
  * parent Service class. This is because the earlier parameters are the
  * ones that most typically change, whereas the later ones are not
  * modified as often.
  *
  * @param \OpenCloud\Identity $conn - a connection object
  * @param string $serviceRegion - identifies the region of this Compute
  *      service
  * @param string $urltype - identifies the URL type ("publicURL",
  *      "privateURL")
  * @param string $serviceName - identifies the name of the service in the
  *      catalog
  */
 public function __construct(OpenStack $conn, $serviceType, $serviceName, $serviceRegion, $urltype)
 {
     $this->debug(_('initializing Nova...'));
     parent::__construct($conn, $serviceType, $serviceName, $serviceRegion, $urltype);
     $this->_url = noslash(parent::Url());
 }
開發者ID:aaronpburke,項目名稱:cron-backup-script,代碼行數:22,代碼來源:nova.php


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