本文整理汇总了PHP中WindowsAzure\Common\Internal\Validate::isBoolean方法的典型用法代码示例。如果您正苦于以下问题:PHP Validate::isBoolean方法的具体用法?PHP Validate::isBoolean怎么用?PHP Validate::isBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowsAzure\Common\Internal\Validate
的用法示例。
在下文中一共展示了Validate::isBoolean方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fromArray
/**
* Fill storage account from array
*
* @param array $options Array containing values for object properties
*
* @return none
*/
public function fromArray($options)
{
if (isset($options['Name'])) {
Validate::isString($options['Name'], 'options[Name]');
$this->_name = $options['Name'];
}
if (isset($options['IsDefault'])) {
Validate::isBoolean($options['IsDefault'], 'options[IsDefault]');
$this->_isDefault = $options['IsDefault'];
}
}
示例2: fromArray
/**
* Fill ChannelSlate from array.
*
* @param array $options Array containing values for object properties
*/
public function fromArray($options)
{
if (isset($options['InsertSlateOnAdMarker'])) {
Validate::isBoolean($options['InsertSlateOnAdMarker'], 'options[InsertSlateOnAdMarker]');
$this->_insertSlateOnAdMarker = (bool) $options['InsertSlateOnAdMarker'];
}
if (isset($options['DefaultSlateAssetId'])) {
Validate::isString($options['DefaultSlateAssetId'], 'options[DefaultSlateAssetIdUrl]');
$this->_defaultSlateAssetId = $options['DefaultSlateAssetId'];
}
}
示例3: fromArray
/**
* Fill asset file from array
*
* @param array $options Array containing values for object properties
*
* @return none
*/
public function fromArray($options)
{
if (isset($options['Id'])) {
Validate::isString($options['Id'], 'options[Id]');
$this->_id = $options['Id'];
}
if (isset($options['Name'])) {
Validate::isString($options['Name'], 'options[Name]');
$this->_name = $options['Name'];
}
if (isset($options['ContentFileSize'])) {
Validate::isString($options['ContentFileSize'], 'options[ContentFileSize]');
$this->_contentFileSize = $options['ContentFileSize'];
}
if (isset($options['ParentAssetId'])) {
Validate::isString($options['ParentAssetId'], 'options[ParentAssetId]');
$this->_parentAssetId = $options['ParentAssetId'];
}
if (isset($options['EncryptionVersion'])) {
Validate::isString($options['EncryptionVersion'], 'options[EncryptionVersion]');
$this->_encryptionVersion = $options['EncryptionVersion'];
}
if (isset($options['EncryptionScheme'])) {
Validate::isString($options['EncryptionScheme'], 'options[EncryptionScheme]');
$this->_encryptionScheme = $options['EncryptionScheme'];
}
if (isset($options['IsEncrypted'])) {
Validate::isBoolean($options['IsEncrypted'], 'options[IsEncrypted]');
$this->_isEncrypted = $options['IsEncrypted'];
}
if (isset($options['EncryptionKeyId'])) {
Validate::isString($options['EncryptionKeyId'], 'options[EncryptionKeyId]');
$this->_encryptionKeyId = $options['EncryptionKeyId'];
}
if (isset($options['InitializationVector'])) {
Validate::isString($options['InitializationVector'], 'options[InitializationVector]');
$this->_initializationVector = $options['InitializationVector'];
}
if (isset($options['IsPrimary'])) {
Validate::isBoolean($options['IsPrimary'], 'options[IsPrimary]');
$this->_isPrimary = $options['IsPrimary'];
}
if (isset($options['LastModified'])) {
Validate::isDateString($options['LastModified'], 'options[LastModified]');
$this->_lastModified = new \DateTime($options['LastModified']);
}
if (isset($options['Created'])) {
Validate::isDateString($options['Created'], 'options[Created]');
$this->_created = new \DateTime($options['Created']);
}
if (isset($options['MimeType'])) {
Validate::isString($options['MimeType'], 'options[MimeType]');
$this->_mimeType = $options['MimeType'];
}
if (isset($options['ContentChecksum'])) {
Validate::isString($options['ContentChecksum'], 'options[ContentChecksum]');
$this->_contentCheckSum = $options['ContentChecksum'];
}
}
示例4: testIsBooleanWithBoolean
/**
* @covers WindowsAzure\Common\Internal\Validate::isBoolean
*/
public function testIsBooleanWithBoolean()
{
Validate::isBoolean(true);
$this->assertTrue(true);
}
示例5: setIncludeMetadata
/**
* Sets the include metadata flag.
*
* @param bool $includeMetadata value.
*
* @return none.
*/
public function setIncludeMetadata($includeMetadata)
{
Validate::isBoolean($includeMetadata);
$this->_includeMetadata = $includeMetadata;
}
示例6: setIncludeUncommittedBlobs
/**
* Sets the include uncommittedBlobs flag.
*
* @param bool $includeUncommittedBlobs value.
*
* @return none.
*/
public function setIncludeUncommittedBlobs($includeUncommittedBlobs)
{
Validate::isBoolean($includeUncommittedBlobs);
$this->_includeUncommittedBlobs = $includeUncommittedBlobs;
}
示例7: fromArray
/**
* Fill manifest file from array
*
* @param array $options Array containing values for object properties
*
* @return none
*/
public function fromArray($options)
{
if (isset($options['Id'])) {
Validate::isString($options['Id'], 'options[Id]');
$this->_id = $options['Id'];
}
if (isset($options['Name'])) {
Validate::isString($options['Name'], 'options[Name]');
$this->_name = $options['Name'];
}
if (isset($options['EncryptionVersion'])) {
Validate::isString($options['EncryptionVersion'], 'options[EncryptionVersion]');
$this->_encryptionVersion = $options['EncryptionVersion'];
}
if (isset($options['EncryptionScheme'])) {
Validate::isString($options['EncryptionScheme'], 'options[EncryptionScheme]');
$this->_encryptionScheme = $options['EncryptionScheme'];
}
if (isset($options['IsEncrypted'])) {
Validate::isBoolean($options['IsEncrypted'], 'options[IsEncrypted]');
$this->_isEncrypted = $options['IsEncrypted'];
}
if (isset($options['EncryptionKeyId'])) {
Validate::isString($options['EncryptionKeyId'], 'options[EncryptionKeyId]');
$this->_encryptionKeyId = $options['EncryptionKeyId'];
}
if (isset($options['InitializationVector'])) {
Validate::isString($options['InitializationVector'], 'options[InitializationVector]');
$this->_initializationVector = $options['InitializationVector'];
}
if (isset($options['IsPrimary'])) {
Validate::isBoolean($options['IsPrimary'], 'options[IsPrimary]');
$this->_isPrimary = $options['IsPrimary'];
}
if (isset($options['LastModified'])) {
Validate::isDateString($options['LastModified'], 'options[LastModified]');
$this->_lastModified = new \DateTime($options['LastModified']);
}
if (isset($options['Created'])) {
Validate::isDateString($options['Created'], 'options[Created]');
$this->_created = new \DateTime($options['Created']);
}
if (isset($options['MimeType'])) {
Validate::isString($options['MimeType'], 'options[MimeType]');
$this->_mimeType = $options['MimeType'];
}
if (isset($options['State'])) {
Validate::isInteger($options['State'], 'options[State]');
$this->_state = $options['State'];
}
if (isset($options['ParentIngestManifestId'])) {
Validate::isString($options['ParentIngestManifestId'], 'options[ParentIngestManifestId]');
$this->_parentIngestManifestId = $options['ParentIngestManifestId'];
}
if (isset($options['ParentIngestManifestAssetId'])) {
Validate::isString($options['ParentIngestManifestAssetId'], 'options[ParentIngestManifestAssetId]');
$id = $options['ParentIngestManifestAssetId'];
$this->_parentIngestManifestAssetId = $id;
}
if (isset($options['ErrorDetail'])) {
Validate::isString($options['ErrorDetail'], 'options[ErrorDetail]');
$this->_errorDetail = $options['ErrorDetail'];
}
}
示例8: setDeleteSnaphotsOnly
/**
* Sets blob deleteSnaphotsOnly.
*
* @param string $deleteSnaphotsOnly value.
*
* @return boolean.
*/
public function setDeleteSnaphotsOnly($deleteSnaphotsOnly)
{
Validate::isBoolean($deleteSnaphotsOnly);
$this->_deleteSnaphotsOnly = $deleteSnaphotsOnly;
}
示例9: setTreatWarningsAsErrors
/**
* Sets treat warnings as errors flag.
*
* @param bool $treatWarningsAsErrors Indicates whether to treat package
* validation warnings as errors.
*
* @return none
*/
public function setTreatWarningsAsErrors($treatWarningsAsErrors)
{
Validate::isBoolean($treatWarningsAsErrors, 'treatWarningsAsErrors');
$this->_treatWarningsAsErrors = $treatWarningsAsErrors;
}
示例10: setComputeRangeMD5
/**
* Sets computeRangeMD5
*
* @param boolean $computeRangeMD5 value
*
* @return none
*/
public function setComputeRangeMD5($computeRangeMD5)
{
Validate::isBoolean($computeRangeMD5);
$this->_computeRangeMD5 = $computeRangeMD5;
}
示例11: 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());
}
示例12: setEmbedDetail
/**
* Sets the embed detail flag.
*
* @param boolean $embedDetail The embed detail flag.
*
* @return none
*/
public function setEmbedDetail($embedDetail)
{
Validate::isBoolean($embedDetail);
$this->_embedDetail = $embedDetail;
}