本文整理汇总了PHP中WindowsAzure\Common\Internal\Validate::isInteger方法的典型用法代码示例。如果您正苦于以下问题:PHP Validate::isInteger方法的具体用法?PHP Validate::isInteger怎么用?PHP Validate::isInteger使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类WindowsAzure\Common\Internal\Validate
的用法示例。
在下文中一共展示了Validate::isInteger方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: fromArray
/**
* Fill VideoStream from array.
*
* @param array $options Array containing values for object properties
*/
public function fromArray($options)
{
if (isset($options['Index'])) {
Validate::isInteger($options['Index'], 'options[Index]');
$this->_index = (int) $options['Index'];
}
}
示例2: fromArray
/**
* Fill ChannelOutputHls from array.
*
* @param array $options Array containing values for object properties
*/
public function fromArray($options)
{
if (isset($options['FragmentsPerSegment'])) {
Validate::isInteger($options['FragmentsPerSegment'], 'options[FragmentsPerSegment]');
$this->_fragmentsPerSegment = (int) $options['FragmentsPerSegment'];
}
}
示例3: fromArray
/**
* Fill error detail from array
*
* @param array $options Array containing values for object properties
*
* @return none
*/
public function fromArray($options)
{
if (isset($options['Code'])) {
Validate::isInteger($options['Code'], 'options[Code]');
$this->_code = $options['Code'];
}
if (isset($options['Message'])) {
Validate::isString($options['Message'], 'options[Message]');
$this->_message = $options['Message'];
}
}
示例4: fromArray
/**
* Fill EncodingReservedUnitType from array.
*
* @param array $options Array containing values for object properties
*/
public function fromArray($options)
{
if (isset($options['AccountId'])) {
Validate::isString($options['AccountId'], 'options[AccountId]');
$this->_accountId = $options['AccountId'];
}
if (isset($options['ReservedUnitType'])) {
Validate::isInteger($options['ReservedUnitType'], 'options[ReservedUnitType]');
$this->_reservedUnitType = intval($options['ReservedUnitType']);
}
if (isset($options['MaxReservableUnits'])) {
Validate::isInteger($options['MaxReservableUnits'], 'options[MaxReservableUnits]');
$this->_maxReservableUnits = intval($options['MaxReservableUnits']);
}
if (isset($options['CurrentReservedUnits'])) {
Validate::isString($options['CurrentReservedUnits'], 'options[CurrentReservedUnits]');
$this->_currentReservedUnits = intval($options['CurrentReservedUnits']);
}
}
示例5: addStatusCode
/**
* Adds status code to the expected status codes.
*
* @param integer $statusCode The expected status code.
*
* @return none
*/
public function addStatusCode($statusCode)
{
Validate::isInteger($statusCode, 'statusCode');
$this->_statusCodes[] = $statusCode;
}
示例6: fromArray
/**
* Fill task historical event from array
*
* @param array $options Array containing values for object properties
*
* @return none
*/
public function fromArray($options)
{
if (isset($options['Code'])) {
Validate::isInteger($options['Code'], 'options[Code]');
$this->_code = $options['Code'];
}
if (isset($options['Message'])) {
Validate::isString($options['Message'], 'options[Message]');
$this->_message = $options['Message'];
}
if (isset($options['TimeStamp'])) {
Validate::isDateString($options['TimeStamp'], 'options[TimeStamp]');
$this->_timeStamp = new \DateTime($options['TimeStamp']);
}
}
示例7: setRangeEnd
/**
* Sets rangeEnd
*
* @param integer $rangeEnd range end value in bytes
*
* @return none
*/
public function setRangeEnd($rangeEnd)
{
Validate::isInteger($rangeEnd, 'rangeEnd');
$this->_rangeEnd = $rangeEnd;
}
示例8: getProtectionKeyId
/**
* The GetProtectionKeyId function retrieves an X.509 certificate thumbprint that
* is used to ensure that you have the correct certificate installed on your
* machine when encrypting your user-defined content key.
*
* @param int $contentKeyType ContentKey type
*
* @return string
*/
public function getProtectionKeyId($contentKeyType)
{
Validate::isInteger($contentKeyType, 'contentKeyType');
$method = Resources::HTTP_GET;
$path = "GetProtectionKeyId?contentKeyType={$contentKeyType}";
$headers = array();
$postParams = array();
$queryParams = array();
$statusCode = Resources::STATUS_OK;
$response = $this->send($method, $headers, $postParams, $queryParams, $path, $statusCode);
return (string) simplexml_load_string($response->getBody());
}
示例9: 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'];
}
}
示例10: 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'];
}
}
示例11: updateMessage
/**
* Updates the visibility timeout of a message and/or the message contents.
*
* @param string $queueName The queue name.
* @param string $messageId The id of the message.
* @param string $popReceipt The valid pop receipt
* value returned from an earlier call to the Get Messages or Update Message
* operation.
* @param string $messageText The message contents.
* @param int $visibilityTimeoutInSeconds Specifies the new
* visibility timeout value, in seconds, relative to server time.
* The new value must be larger than or equal to 0, and cannot be larger
* than 7 days. The visibility timeout of a message cannot be set to a value
* later than the expiry time. A message can be updated until it has been
* deleted or has expired.
* @param QueueServiceOptions $options The optional
* parameters.
*
* @return WindowsAzure\Common\Models\UpdateMessageResult
*/
public function updateMessage($queueName, $messageId, $popReceipt, $messageText, $visibilityTimeoutInSeconds, $options = null)
{
Validate::isString($queueName, 'queueName');
Validate::notNullOrEmpty($queueName, 'queueName');
Validate::isString($messageId, 'messageId');
Validate::notNullOrEmpty($messageId, 'messageId');
Validate::isString($popReceipt, 'popReceipt');
Validate::notNullOrEmpty($popReceipt, 'popReceipt');
Validate::isString($messageText, 'messageText');
Validate::isInteger($visibilityTimeoutInSeconds, 'visibilityTimeoutInSeconds');
Validate::notNull($visibilityTimeoutInSeconds, 'visibilityTimeoutInSeconds');
$method = Resources::HTTP_PUT;
$headers = array();
$postParams = array();
$queryParams = array();
$path = $queueName . '/messages' . '/' . $messageId;
$body = Resources::EMPTY_STRING;
$statusCode = Resources::STATUS_NO_CONTENT;
if (is_null($options)) {
$options = new QueueServiceOptions();
}
$this->addOptionalQueryParam($queryParams, Resources::QP_VISIBILITY_TIMEOUT, $visibilityTimeoutInSeconds);
$this->addOptionalQueryParam($queryParams, Resources::QP_TIMEOUT, $options->getTimeout());
$this->addOptionalQueryParam($queryParams, Resources::QP_POPRECEIPT, $popReceipt);
if (!empty($messageText)) {
$this->addOptionalHeader($headers, Resources::CONTENT_TYPE, Resources::URL_ENCODED_CONTENT_TYPE);
$message = new QueueMessage();
$message->setMessageText($messageText);
$body = $message->toXml($this->dataSerializer);
}
$response = $this->send($method, $headers, $queryParams, $postParams, $path, $statusCode, $body);
$popReceipt = $response->getHeader(Resources::X_MS_POPRECEIPT);
$timeNextVisible = $response->getHeader(Resources::X_MS_TIME_NEXT_VISIBLE);
$date = Utilities::rfc1123ToDateTime($timeNextVisible);
$result = new UpdateMessageResult();
$result->setPopReceipt($popReceipt);
$result->setTimeNextVisible($date);
return $result;
}
示例12: fromArray
/**
* Fill job template 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['JobTemplateBody'])) {
Validate::isString($options['JobTemplateBody'], 'options[JobTemplateBody]');
$this->_jobTemplateBody = $options['JobTemplateBody'];
}
if (isset($options['NumberofInputAssets'])) {
Validate::isInteger($options['NumberofInputAssets'], 'options[NumberofInputAssets]');
$this->_numberofInputAssets = $options['NumberofInputAssets'];
}
if (isset($options['TemplateType'])) {
Validate::isInteger($options['TemplateType'], 'options[TemplateType]');
$this->_templateType = $options['TemplateType'];
}
}
示例13: fromArray
/**
* Fill task template 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['Created'])) {
Validate::isDateString($options['Created'], 'options[Created]');
$this->_created = new \DateTime($options['Created']);
}
if (isset($options['Description'])) {
Validate::isString($options['Description'], 'options[Description]');
$this->_description = $options['Description'];
}
if (isset($options['LastModified'])) {
Validate::isDateString($options['LastModified'], 'options[LastModified]');
$this->_lastModified = new \DateTime($options['LastModified']);
}
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['NumberofInputAssets'])) {
Validate::isInteger($options['NumberofInputAssets'], 'options[NumberofInputAssets]');
$this->_numberofInputAssets = $options['NumberofInputAssets'];
}
if (isset($options['NumberofOutputAssets'])) {
Validate::isInteger($options['NumberofOutputAssets'], 'options[NumberofOutputAssets]');
$this->_numberofOutputAssets = $options['NumberofOutputAssets'];
}
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'];
}
}
示例14: fromArray
/**
* Fill ContentKeyAuthorizationPolicyOption from array
*
* @param array $options Array containing values for object properties
*
* @return void
*/
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['KeyDeliveryType'])) {
Validate::isInteger($options['KeyDeliveryType'], 'options[KeyDeliveryType]');
$this->_keyDeliveryType = $options['KeyDeliveryType'];
}
if (isset($options['KeyDeliveryConfiguration'])) {
Validate::isString($options['KeyDeliveryConfiguration'], 'options[KeyDeliveryConfiguration]');
$this->_keyDeliveryConfiguration = $options['KeyDeliveryConfiguration'];
}
if (!empty($options['Restrictions'])) {
Validate::isArray($options['Restrictions'], 'options[Restrictions]');
foreach ($options['Restrictions'] as $restriction) {
$this->_restrictions[] = ContentKeyAuthorizationPolicyRestriction::createFromOptions($restriction);
}
}
}
示例15: 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;
}
}
}
}