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


PHP Internal\Validate类代码示例

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


在下文中一共展示了Validate类的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'];
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:12,代码来源:VideoStream.php

示例2: fromArray

 /**
  * Fill ChannelOutput from array.
  *
  * @param array $options Array containing values for object properties
  */
 public function fromArray($options)
 {
     if (isset($options['Hls'])) {
         Validate::isArray($options['Hls'], 'options[Hls]');
         $this->_hls = ChannelOutputHls::createFromOptions($options['Hls']);
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:12,代码来源:ChannelOutput.php

示例3: 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'];
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:12,代码来源:ChannelOutputHls.php

示例4: fromArray

 /**
  * Fill ChannelPreviewAccessControl from array.
  *
  * @param array $options Array containing values for object properties
  */
 public function fromArray($options)
 {
     if (!empty($options['IP'])) {
         Validate::isArray($options['IP'], 'options[IP]');
         $this->_ip = IPAccessControl::createFromOptions($options['IP']);
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:12,代码来源:ChannelPreviewAccessControl.php

示例5: handleRequest

 /**
  * Adds WRAP authentication header to the request headers.
  *
  * @param HttpClient $request HTTP channel object.
  * 
  * @return \HTTP_Request2
  */
 public function handleRequest($request)
 {
     Validate::notNull($request, 'request');
     $wrapAccessToken = $this->_wrapTokenManager->getAccessToken($request->getUrl());
     $authorization = sprintf(Resources::WRAP_AUTHORIZATION, $wrapAccessToken);
     $request->setHeader(Resources::AUTHENTICATION, $authorization);
     return $request;
 }
开发者ID:rdohms,项目名称:azure-sdk-for-php,代码行数:15,代码来源:WrapFilter.php

示例6: create

 /**
  * Creates new object based on the builder type in the $config.
  *
  * @param WindowsAzure\Common\Configuration             $config  The config
  * object.
  * @param WindowsAzure\Common\Internal\IServicesBuilder $builder The builder
  * object.
  * 
  * @return WindowsAzure\Blob\BlobRestProxy
  */
 public static function create($config, $builder = null)
 {
     Validate::isTrue($config instanceof Configuration, Resources::INVALID_CONFIG_MSG);
     if (!is_null($builder)) {
         Validate::isTrue($builder instanceof IServiceBuilder, Resources::INVALID_BUILDER_MSG);
     }
     return $config->create(Resources::BLOB_TYPE_NAME, $builder);
 }
开发者ID:rdohms,项目名称:azure-sdk-for-php,代码行数:18,代码来源:BlobService.php

示例7: fromArray

 /**
  * Fill IPRange from array.
  *
  * @param array $options Array containing values for object properties
  */
 public function fromArray($options)
 {
     if (isset($options['Allow'])) {
         Validate::isArray($options['Allow'], 'options[Allow]');
         foreach ($options['Allow'] as $allow) {
             $this->_allow[] = IPRange::createFromOptions($allow);
         }
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:14,代码来源:IPAccessControl.php

示例8: addEntry

 /**
  * Adds new entry to the block list entries.
  * 
  * @param string $blockId The block id.
  * @param string $type    The entry type, you can use BlobBlockType.
  * 
  * @return none
  */
 public function addEntry($blockId, $type)
 {
     Validate::isString($blockId, 'blockId');
     Validate::isTrue(BlobBlockType::isValid($type), sprintf(Resources::INVALID_BTE_MSG, get_class(new BlobBlockType())));
     $block = new Block();
     $block->setBlockId($blockId);
     $block->setType($type);
     $this->_entries[] = $block;
 }
开发者ID:isrealconsulting,项目名称:site,代码行数:17,代码来源:BlockList.php

示例9: __construct

 /**
  * Constructor
  * 
  * @param string    $incarnation          The incarnation.
  * @param string    $expectedState        The expected state.
  * @param string    $environmentPath      The environment path.
  * @param \DateTime $deadline             The deadline.
  * @param string    $currentStateEndpoint The current state endpoint.
  */
 public function __construct($incarnation, $expectedState, $environmentPath, $deadline, $currentStateEndpoint)
 {
     Validate::isDate($deadline);
     $this->_incarnation = $incarnation;
     $this->_expectedState = $expectedState;
     $this->_environmentPath = $environmentPath;
     $this->_deadline = $deadline;
     $this->_currentStateEndpoint = $currentStateEndpoint;
 }
开发者ID:southworkscom,项目名称:vscom,代码行数:18,代码来源:GoalState.php

示例10: unserialize

 /**
  * Unserializes given serialized string to array.
  *
  * @param string $serialized The serialized object in string representation.
  *
  * @return array
  */
 public function unserialize($serialized)
 {
     Validate::isString($serialized, 'serialized');
     $json = json_decode($serialized);
     if ($json && !is_array($json)) {
         return get_object_vars($json);
     } else {
         return $json;
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:17,代码来源:JsonSerializer.php

示例11: __construct

 /**
  * Creates an RuleInfo with specified parameters.
  *
  * @param string          $title           The title of the rule.
  * @param RuleDescription $ruleDescription The description of the rule.
  */
 public function __construct($title = Resources::EMPTY_STRING, $ruleDescription = null)
 {
     Validate::isString($title, 'title');
     if (is_null($ruleDescription)) {
         $ruleDescription = new RuleDescription();
     }
     $this->_ruleDescription = $ruleDescription;
     $this->_entry = new Entry();
     $this->_entry->setTitle($title);
     $this->_entry->setAttribute(Resources::XMLNS, Resources::SERVICE_BUS_NAMESPACE);
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:17,代码来源:RuleInfo.php

示例12: fromArray

 /**
  * Fill ChannelEndpoint from array.
  *
  * @param array $options Array containing values for object properties
  */
 public function fromArray($options)
 {
     if (isset($options['Protocol'])) {
         Validate::isString($options['Protocol'], 'options[Protocol]');
         $this->_protocol = $options['Protocol'];
     }
     if (isset($options['Url'])) {
         Validate::isString($options['Url'], 'options[Url]');
         $this->_url = $options['Url'];
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:16,代码来源:ChannelEndpoint.php

示例13: fromArray

 /**
  * Fill ContentKeyAuthorizationPolicy from array.
  *
  * @param array $options Array containing values for object properties
  */
 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'];
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:16,代码来源:ContentKeyAuthorizationPolicy.php

示例14: 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'];
     }
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:16,代码来源:ChannelSlate.php

示例15: 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'];
     }
 }
开发者ID:mat33470,项目名称:PFA,代码行数:18,代码来源:ErrorDetail.php


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