当前位置: 首页>>代码示例>>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;未经允许,请勿转载。