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


PHP Validate::isDouble方法代码示例

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


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

示例1: fromArray

 /**
  * Fill asset 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['Created'])) {
         Validate::isDateString($options['Created'], 'options[Created]');
         $this->_created = new \DateTime($options['Created']);
     }
     if (isset($options['LastModified'])) {
         Validate::isDateString($options['LastModified'], 'options[LastModified]');
         $this->_lastModified = new \DateTime($options['LastModified']);
     }
     if (isset($options['EndTime'])) {
         Validate::isDateString($options['EndTime'], 'options[EndTime]');
         $this->_endTime = new \DateTime($options['EndTime']);
     }
     if (isset($options['Priority'])) {
         Validate::isInteger($options['Priority'], 'options[Priority]');
         $this->_priority = $options['Priority'];
     }
     if (isset($options['RunningDuration'])) {
         Validate::isDouble($options['RunningDuration'], 'options[RunningDuration]');
         $this->_runningDuration = $options['RunningDuration'];
     }
     if (isset($options['StartTime'])) {
         Validate::isDateString($options['StartTime'], 'options[StartTime]');
         $this->_startTime = new \DateTime($options['StartTime']);
     }
     if (isset($options['State'])) {
         Validate::isInteger($options['State'], 'options[State]');
         $this->_state = $options['State'];
     }
     if (isset($options['TemplateId'])) {
         Validate::isString($options['TemplateId'], 'options[TemplateId]');
         $this->_templateId = $options['TemplateId'];
     }
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:50,代码来源:Job.php

示例2: fromArray

 /**
  * Fill access policy 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['Created'])) {
         Validate::isDateString($options['Created'], 'options[Created]');
         $this->_created = new \DateTime($options['Created']);
     }
     if (isset($options['LastModified'])) {
         Validate::isDateString($options['LastModified'], 'options[LastModified]');
         $this->_lastModified = new \DateTime($options['LastModified']);
     }
     if (isset($options['Name'])) {
         Validate::isString($options['Name'], 'options[Name]');
         $this->_name = $options['Name'];
     }
     if (isset($options['DurationInMinutes'])) {
         Validate::isDouble($options['DurationInMinutes'], 'options[DurationInMinutes]');
         $this->_durationInMinutes = $options['DurationInMinutes'];
     }
     if (isset($options['Permissions'])) {
         Validate::isInteger($options['Permissions'], 'options[Permissions]');
         $this->_permissions = $options['Permissions'];
     }
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:34,代码来源:AccessPolicy.php

示例3: fromArray

 /**
  * Fill task 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['Configuration'])) {
         Validate::isString($options['Configuration'], 'options[Configuration]');
         $this->_configuration = $options['Configuration'];
     }
     if (isset($options['EndTime'])) {
         Validate::isDateString($options['EndTime'], 'options[EndTime]');
         $this->_endTime = new \DateTime($options['EndTime']);
     }
     if (isset($options['MediaProcessorId'])) {
         Validate::isString($options['MediaProcessorId'], 'options[MediaProcessorId]');
         $this->_mediaProcessorId = $options['MediaProcessorId'];
     }
     if (isset($options['Name'])) {
         Validate::isString($options['Name'], 'options[Name]');
         $this->_name = $options['Name'];
     }
     if (isset($options['PerfMessage'])) {
         Validate::isString($options['PerfMessage'], 'options[PerfMessage]');
         $this->_perfMessage = $options['PerfMessage'];
     }
     if (isset($options['Priority'])) {
         Validate::isInteger($options['Priority'], 'options[Priority]');
         $this->_priority = $options['Priority'];
     }
     if (isset($options['Progress'])) {
         Validate::isDouble($options['Progress'], 'options[Progress]');
         $this->_progress = $options['Progress'];
     }
     if (isset($options['RunningDuration'])) {
         Validate::isDouble($options['RunningDuration'], 'options[RunningDuration]');
         $this->_runningDuration = $options['RunningDuration'];
     }
     if (isset($options['StartTime'])) {
         Validate::isDateString($options['StartTime'], 'options[StartTime]');
         $this->_startTime = new \DateTime($options['StartTime']);
     }
     if (isset($options['State'])) {
         Validate::isInteger($options['State'], 'options[State]');
         $this->_state = $options['State'];
     }
     if (isset($options['TaskBody'])) {
         Validate::isString($options['TaskBody'], 'options[TaskBody]');
         $this->_taskBody = $options['TaskBody'];
     }
     if (isset($options['Options'])) {
         Validate::isInteger($options['Options'], 'options[Options]');
         $this->_options = $options['Options'];
     }
     if (isset($options['EncryptionKeyId'])) {
         Validate::isString($options['EncryptionKeyId'], 'options[EncryptionKeyId]');
         $this->_encryptionKeyId = $options['EncryptionKeyId'];
     }
     if (isset($options['EncryptionScheme'])) {
         Validate::isString($options['EncryptionScheme'], 'options[EncryptionScheme]');
         $this->_encryptionScheme = $options['EncryptionScheme'];
     }
     if (isset($options['EncryptionVersion'])) {
         Validate::isString($options['EncryptionVersion'], 'options[EncryptionVersion]');
         $this->_encryptionVersion = $options['EncryptionVersion'];
     }
     if (isset($options['InitializationVector'])) {
         Validate::isString($options['InitializationVector'], 'options[InitializationVector]');
         $this->_initializationVector = $options['InitializationVector'];
     }
     if (isset($options['ErrorDetails'])) {
         $this->_errorDetails = array();
         if (is_array($options['ErrorDetails'])) {
             foreach ($options['ErrorDetails'] as $errorDetail) {
                 $this->_errorDetails[] = ErrorDetail::createFromOptions($errorDetail);
             }
         }
     }
     if (isset($options['HistoricalEvents'])) {
         $this->_historicalEvents = array();
         if (is_array($options['HistoricalEvents'])) {
             foreach ($options['HistoricalEvents'] as $historicalEvent) {
                 $evnt = TaskHistoricalEvent::createFromOptions($historicalEvent);
                 $this->_historicalEvents[] = $evnt;
             }
         }
     }
 }
开发者ID:mat33470,项目名称:PFA,代码行数:95,代码来源:Task.php

示例4: setValueArrayFloat

 /**
  * Sets a float value in an array. 
  *
  * @param array  &$valueArray The array of a set of values. 
  * @param string $key         The key of the key value pair. 
  * @param float  $value       The value of the key value pair. 
  * 
  * @return none
  */
 public function setValueArrayFloat(&$valueArray, $key, $value)
 {
     Validate::isArray($valueArray, 'valueArray');
     Validate::isString($key, 'key');
     if (!empty($value)) {
         Validate::isDouble($value, 'value');
         $valueArray[$key] = (double) $value;
     }
 }
开发者ID:mat33470,项目名称:PFA,代码行数:18,代码来源:BrokerProperties.php

示例5: testIsDoubleFail

 /**
  * @covers WindowsAzure\Common\Internal\Validate::isDouble
  */
 public function testIsDoubleFail()
 {
     // Setup
     $this->setExpectedException('\\InvalidArgumentException');
     $value = 'testInvalidDoubleValue';
     // Test
     Validate::isDouble($value, 'value');
     // Assert
 }
开发者ID:jdruid,项目名称:Microsoft-Azure-PHP-SDK-Storage,代码行数:12,代码来源:ValidateTest.php


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