本文整理汇总了PHP中Utilities::tryGetValueInsensitive方法的典型用法代码示例。如果您正苦于以下问题:PHP Utilities::tryGetValueInsensitive方法的具体用法?PHP Utilities::tryGetValueInsensitive怎么用?PHP Utilities::tryGetValueInsensitive使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Utilities
的用法示例。
在下文中一共展示了Utilities::tryGetValueInsensitive方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: createFromConnectionString
/**
* Creates a MediaServicesSettings object from the given connection string.
*
* @param string $connectionString The media services settings connection string.
*
* @return MediaServicesSettings
*/
public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::allRequired(self::$_accountNameSetting, self::$_accessKeySetting), self::optional(self::$_endpointUriSetting, self::$_oauthEndpointUriSetting));
if ($matchedSpecs) {
$endpointUri = Utilities::tryGetValueInsensitive(Resources::MEDIA_SERVICES_ENDPOINT_URI_NAME, $tokenizedSettings, Resources::MEDIA_SERVICES_URL);
$oauthEndpointUri = Utilities::tryGetValueInsensitive(Resources::MEDIA_SERVICES_OAUTH_ENDPOINT_URI_NAME, $tokenizedSettings, Resources::MEDIA_SERVICES_OAUTH_URL);
$accountName = Utilities::tryGetValueInsensitive(Resources::MEDIA_SERVICES_ACCOUNT_NAME, $tokenizedSettings);
$accessKey = Utilities::tryGetValueInsensitive(Resources::MEDIA_SERVICES_ACCESS_KEY, $tokenizedSettings);
return new self($accountName, $accessKey, $endpointUri, $oauthEndpointUri);
}
self::noMatch($connectionString);
}
示例2: createFromConnectionString
/**
* Creates a ServiceBusSettings object from the given connection string.
*
* @param string $connectionString The storage settings connection string.
*
* @return ServiceBusSettings
*/
public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::allRequired(self::$_serviceBusEndpointSetting, self::$_wrapNameSetting, self::$_wrapPasswordSetting), self::optional(self::$_wrapEndpointUriSetting));
if ($matchedSpecs) {
$endpoint = Utilities::tryGetValueInsensitive(Resources::SERVICE_BUS_ENDPOINT_NAME, $tokenizedSettings);
// Parse the namespace part from the URI
$namespace = explode('.', parse_url($endpoint, PHP_URL_HOST));
$namespace = $namespace[0];
$wrapEndpointUri = Utilities::tryGetValueInsensitive(Resources::STS_ENDPOINT_NAME, $tokenizedSettings, sprintf(Resources::WRAP_ENDPOINT_URI_FORMAT, $namespace));
$issuerName = Utilities::tryGetValueInsensitive(Resources::SHARED_SECRET_ISSUER_NAME, $tokenizedSettings);
$issuerValue = Utilities::tryGetValueInsensitive(Resources::SHARED_SECRET_VALUE_NAME, $tokenizedSettings);
return new self($endpoint, $namespace, $wrapEndpointUri, $issuerName, $issuerValue);
}
self::noMatch($connectionString);
}
示例3: createFromConnectionString
/**
* Creates a ServiceManagementSettings object from the given connection string.
*
* @param string $connectionString The storage settings connection string.
*
* @return ServiceManagementSettings
*/
public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::allRequired(self::$_subscriptionIdSetting, self::$_certificatePathSetting), self::optional(self::$_endpointSetting));
if ($matchedSpecs) {
$endpointUri = Utilities::tryGetValueInsensitive(Resources::SERVICE_MANAGEMENT_ENDPOINT_NAME, $tokenizedSettings, Resources::SERVICE_MANAGEMENT_URL);
$subscriptionId = Utilities::tryGetValueInsensitive(Resources::SUBSCRIPTION_ID_NAME, $tokenizedSettings);
$certificatePath = Utilities::tryGetValueInsensitive(Resources::CERTIFICATE_PATH_NAME, $tokenizedSettings);
return new self($subscriptionId, $endpointUri, $certificatePath);
}
self::noMatch($connectionString);
}
示例4: createFromConnectionString
/**
* Creates a StorageServiceSettings object from the given connection string.
*
* @param string $connectionString The storage settings connection string.
*
* @return StorageServiceSettings
*/
public static function createFromConnectionString($connectionString)
{
$tokenizedSettings = self::parseAndValidateKeys($connectionString);
// Devstore case
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::allRequired(self::$_useDevelopmentStorageSetting), self::optional(self::$_developmentStorageProxyUriSetting));
if ($matchedSpecs) {
$proxyUri = Utilities::tryGetValueInsensitive(Resources::DEVELOPMENT_STORAGE_PROXY_URI_NAME, $tokenizedSettings);
return self::_getDevelopmentStorageAccount($proxyUri);
}
// Automatic case
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::allRequired(self::$_defaultEndpointsProtocolSetting, self::$_accountNameSetting, self::$_accountKeySetting), self::optional(self::$_blobEndpointSetting, self::$_queueEndpointSetting, self::$_tableEndpointSetting));
if ($matchedSpecs) {
return self::_createStorageServiceSettings($tokenizedSettings, self::_getDefaultServiceEndpoint($tokenizedSettings, Resources::BLOB_BASE_DNS_NAME), self::_getDefaultServiceEndpoint($tokenizedSettings, Resources::QUEUE_BASE_DNS_NAME), self::_getDefaultServiceEndpoint($tokenizedSettings, Resources::TABLE_BASE_DNS_NAME));
}
// Explicit case
$matchedSpecs = self::matchedSpecification($tokenizedSettings, self::atLeastOne(self::$_blobEndpointSetting, self::$_queueEndpointSetting, self::$_tableEndpointSetting), self::allRequired(self::$_accountNameSetting, self::$_accountKeySetting));
if ($matchedSpecs) {
return self::_createStorageServiceSettings($tokenizedSettings);
}
self::noMatch($connectionString);
}