本文整理匯總了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);
}