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