本文整理汇总了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;
}
示例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']);
}
}
示例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);
};
}
示例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'];
}
}
示例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'];
}
}
示例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
}