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


PHP Validate::isValidUri方法代码示例

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


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

示例1: __construct

 /**
  * Creates new media services settings instance.
  *
  * @param string $accountName      The user provided account name.
  * @param string $accessKey        The user provided primary access key
  * @param string $endpointUri      The service management endpoint uri.
  * @param string $oauthEndpointUri The OAuth service endpoint uri.
  */
 public function __construct($accountName, $accessKey, $endpointUri = null, $oauthEndpointUri = null)
 {
     Validate::notNullOrEmpty($accountName, 'accountName');
     Validate::notNullOrEmpty($accessKey, 'accountKey');
     Validate::isString($accountName, 'accountName');
     Validate::isString($accessKey, 'accountKey');
     if ($endpointUri != null) {
         Validate::isValidUri($endpointUri);
     } else {
         $endpointUri = Resources::MEDIA_SERVICES_URL;
     }
     if ($oauthEndpointUri != null) {
         Validate::isValidUri($oauthEndpointUri);
     } else {
         $oauthEndpointUri = Resources::MEDIA_SERVICES_OAUTH_URL;
     }
     $this->_accountName = $accountName;
     $this->_accessKey = $accessKey;
     $this->_endpointUri = $endpointUri;
     $this->_oauthEndpointUri = $oauthEndpointUri;
 }
开发者ID:skinnard,项目名称:FTL-2,代码行数:29,代码来源:MediaServicesSettings.php

示例2: fromArray

 /**
  * Fill locator 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['ExpirationDateTime'])) {
         Validate::isDateString($options['ExpirationDateTime'], 'options[ExpirationDateTime]');
         $this->_expirationDateTime = new \DateTime($options['ExpirationDateTime']);
     }
     if (isset($options['Type'])) {
         Validate::isInteger($options['Type'], 'options[Type]');
         $this->_type = $options['Type'];
     }
     if (isset($options['Path'])) {
         Validate::isValidUri($options['Path'], 'options[Path]');
         $this->_path = $options['Path'];
     }
     if (isset($options['BaseUri'])) {
         Validate::isValidUri($options['BaseUri'], 'options[BaseUri]');
         $this->_baseUri = $options['BaseUri'];
     }
     if (isset($options['ContentAccessComponent'])) {
         Validate::isString($options['ContentAccessComponent'], 'options[ContentAccessComponent]');
         $this->_contentAccessComponent = $options['ContentAccessComponent'];
     }
     if (isset($options['AccessPolicyId'])) {
         Validate::isString($options['AccessPolicyId'], 'options[AccessPolicyId]');
         $this->_accessPolicyId = $options['AccessPolicyId'];
     }
     if (isset($options['AssetId'])) {
         Validate::isString($options['AssetId'], 'options[AssetId]');
         $this->_assetId = $options['AssetId'];
     }
     if (isset($options['StartTime'])) {
         Validate::isDateString($options['StartTime'], 'options[StartTime]');
         $this->_startTime = new \DateTime($options['StartTime']);
     }
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:50,代码来源:Locator.php

示例3: getIsValidUri

 /**
  * Creates a anonymous function that check if the given uri is valid or not.
  *
  * @return callable
  */
 public static function getIsValidUri()
 {
     return function ($uri) {
         return Validate::isValidUri($uri);
     };
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:11,代码来源:Validate.php

示例4: fromArray

 /**
  * Fill manifest 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['State'])) {
         Validate::isInteger($options['State'], 'options[State]');
         $this->_state = $options['State'];
     }
     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['BlobStorageUriForUpload'])) {
         Validate::isValidUri($options['BlobStorageUriForUpload'], 'options[BlobStorageUriForUpload]');
         $this->_blobStorageUriForUpload = $options['BlobStorageUriForUpload'];
     }
     if (isset($options['Statistics'])) {
         $this->_statistics = null;
         if (is_array($options['Statistics'])) {
             $this->_statistics = IngestManifestStatistics::createFromOptions($options['Statistics']);
         }
     }
     if (isset($options['StorageAccountName'])) {
         Validate::isString($options['StorageAccountName'], 'options[StorageAccountName]');
         $this->_storageAccountName = $options['StorageAccountName'];
     }
 }
开发者ID:jwdunne,项目名称:azure-sdk-for-php,代码行数:44,代码来源:IngestManifest.php

示例5: 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['State'])) {
         Validate::isInteger($options['State'], 'options[State]');
         $this->_state = $options['State'];
     }
     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['AlternateId'])) {
         Validate::isString($options['AlternateId'], 'options[AlternateId]');
         $this->_alternateId = $options['AlternateId'];
     }
     if (isset($options['Name'])) {
         Validate::isString($options['Name'], 'options[Name]');
         $this->_name = $options['Name'];
     }
     if (isset($options['Options'])) {
         Validate::isInteger($options['Options'], 'options[Options]');
         $this->_options = $options['Options'];
     }
     if (isset($options['Uri'])) {
         Validate::isValidUri($options['Uri'], 'options[Uri]');
         $this->_uri = $options['Uri'];
     }
     if (isset($options['StorageAccountName'])) {
         Validate::isString($options['StorageAccountName'], 'options[StorageAccountName]');
         $this->_storageAccountName = $options['StorageAccountName'];
     }
 }
开发者ID:bitmovin,项目名称:azure-sdk-for-php,代码行数:46,代码来源:Asset.php

示例6: testIsValidUriNotUri

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


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