当前位置: 首页>>代码示例>>PHP>>正文


PHP Utilities::booleanToString方法代码示例

本文整理汇总了PHP中WindowsAzure\Common\Internal\Utilities::booleanToString方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::booleanToString方法的具体用法?PHP Utilities::booleanToString怎么用?PHP Utilities::booleanToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在WindowsAzure\Common\Internal\Utilities的用法示例。


在下文中一共展示了Utilities::booleanToString方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: testBooleanToString

 /**
  * @covers WindowsAzure\Common\Internal\Utilities::booleanToString
  */
 public function testBooleanToString()
 {
     // Setup
     $expected = 'true';
     $value = true;
     // Test
     $actual = Utilities::booleanToString($value);
     // Assert
     $this->assertEquals($expected, $actual);
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:13,代码来源:UtilitiesTest.php

示例2: toArray

 /**
  * Converts this object to array with XML tags
  * 
  * @return array. 
  */
 public function toArray()
 {
     $array = array('Enabled' => Utilities::booleanToString($this->_enabled));
     if (isset($this->_days)) {
         $array['Days'] = strval($this->_days);
     }
     return $array;
 }
开发者ID:southworkscom,项目名称:vscom,代码行数:13,代码来源:RetentionPolicy.php

示例3: toArray

 /**
  * Converts this object to array with XML tags
  * 
  * @return array. 
  */
 public function toArray()
 {
     $array = array('Version' => $this->_version, 'Enabled' => Utilities::booleanToString($this->_enabled));
     if ($this->_enabled) {
         $array['IncludeAPIs'] = Utilities::booleanToString($this->_includeAPIs);
     }
     $array['RetentionPolicy'] = !empty($this->_retentionPolicy) ? $this->_retentionPolicy->toArray() : null;
     return $array;
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:14,代码来源:Metrics.php

示例4: toArray

 /**
  * Converts this object to array with XML tags
  * 
  * @return array. 
  */
 public function toArray()
 {
     return array('Version' => $this->_version, 'Delete' => Utilities::booleanToString($this->_delete), 'Read' => Utilities::booleanToString($this->_read), 'Write' => Utilities::booleanToString($this->_write), 'RetentionPolicy' => !empty($this->_retentionPolicy) ? $this->_retentionPolicy->toArray() : null);
 }
开发者ID:leotaillard,项目名称:btws2016,代码行数:9,代码来源:Logging.php

示例5: rollbackUpdateOrUpgrade

 /**
  * Cancels an in progress configuration change (update) or upgrade and returns
  * the deployment to its state before the upgrade or configuration change was
  * started.
  *
  * Note that you can rollback update or upgrade either by specifying the
  * deployment environment (staging or production), or by specifying the
  * deployment's unique name.
  *
  * @param string               $name    The hosted service name.
  * @param string               $mode    Specifies whether the rollback
  * should proceed automatically or not. Auto, The rollback proceeds without
  * further user input. Manual, You must call the walkUpgradeDomain API to apply
  * the rollback to each upgrade domain.
  * @param boolean              $force   Specifies whether the rollback
  * should proceed even when it will cause local data to be lost from some role
  * instances. True if the rollback should proceed; otherwise false if the
  * rollback should fail.
  * @param GetDeploymentOptions $options The optional parameters.
  *
  * @return none
  *
  * @see http://msdn.microsoft.com/en-us/library/windowsazure/hh403977.aspx
  */
 public function rollbackUpdateOrUpgrade($name, $mode, $force, $options)
 {
     Validate::isString($name, 'name');
     Validate::notNullOrEmpty($name, 'name');
     Validate::isString($mode, 'mode');
     Validate::isTrue(Mode::isValid($mode), Resources::INVALID_CHANGE_MODE_MSG);
     Validate::isBoolean($force, 'force');
     Validate::notNullOrEmpty($force, 'force');
     Validate::notNullOrEmpty($options, 'options');
     $xmlElements = array(Resources::XTAG_MODE => $mode, Resources::XTAG_FORCE => Utilities::booleanToString($force));
     $body = $this->_createRequestXml($xmlElements, Resources::XTAG_ROLLBACK_UPDATE_OR_UPGRADE);
     $context = new HttpCallContext();
     $context->setMethod(Resources::HTTP_POST);
     $context->setPath($this->_getDeploymentPath($name, $options) . '/');
     $context->addStatusCode(Resources::STATUS_ACCEPTED);
     $context->addQueryParameter(Resources::QP_COMP, Resources::QPV_ROLLBACK);
     $context->setBody($body);
     $context->addHeader(Resources::CONTENT_TYPE, Resources::XML_CONTENT_TYPE);
     assert(Utilities::endsWith($context->getPath(), '/'));
     $response = $this->sendContext($context);
     return AsynchronousOperationResult::create($response->getHeader());
 }
开发者ID:mat33470,项目名称:PFA,代码行数:46,代码来源:ServiceManagementRestProxy.php


注:本文中的WindowsAzure\Common\Internal\Utilities::booleanToString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。