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


PHP Utilities::tryGetArray方法代码示例

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


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

示例1: create

 /**
  * Creates new ListStorageServicesResult from parsed response body.
  * 
  * @param array $parsed The parsed response body.
  * 
  * @return ListStorageServicesResult
  */
 public static function create($parsed)
 {
     $result = new ListStorageServicesResult();
     $rowStorageServices = Utilities::tryGetArray(Resources::XTAG_STORAGE_SERVICE, $parsed);
     foreach ($rowStorageServices as $rowStorageService) {
         $result->_storageServices[] = new StorageService($rowStorageService);
     }
     return $result;
 }
开发者ID:GabrielAnca,项目名称:azure-sdk-for-php,代码行数:16,代码来源:ListStorageServicesResult.php

示例2: create

 /**
  * Creates new ListAffinityGroupsResult from parsed response body.
  * 
  * @param array $parsed The parsed response body.
  * 
  * @return ListAffinityGroupsResult
  */
 public static function create($parsed)
 {
     $result = new self();
     $result->_affinityGroups = array();
     $entries = Utilities::tryGetArray(Resources::XTAG_AFFINITY_GROUP, $parsed);
     foreach ($entries as $value) {
         $result->_affinityGroups[] = new AffinityGroup($value);
     }
     return $result;
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:17,代码来源:ListAffinityGroupsResult.php

示例3: create

 /**
  * Creates new ListHostedServicesResult from parsed response body.
  * 
  * @param array $parsed The parsed response body.
  * 
  * @return ListHostedServicesResult
  */
 public static function create($parsed)
 {
     $result = new ListHostedServicesResult();
     $result->_hostedServices = array();
     $rowHostedServices = Utilities::tryGetArray(Resources::XTAG_HOSTED_SERVICE, $parsed);
     foreach ($rowHostedServices as $rowHostedService) {
         $properties = Utilities::tryGetArray(Resources::XTAG_HOSTED_SERVICE_PROPERTIES, $rowHostedService);
         $hostedService = new HostedService($rowHostedService, $properties);
         $result->_hostedServices[] = $hostedService;
     }
     return $result;
 }
开发者ID:azt3k,项目名称:drupal-azure-blob,代码行数:19,代码来源:ListHostedServicesResult.php

示例4: create

 /**
  * Creates new ListStorageServicesResult from parsed response body.
  * 
  * @param array $parsed The parsed response body.
  * 
  * @return ListStorageServicesResult
  */
 public static function create($parsed)
 {
     $result = new ListStorageServicesResult();
     $result->_storageServices = array();
     $entries = Utilities::tryGetArray(Resources::XTAG_STORAGE_SERVICE, $parsed);
     foreach ($entries as $value) {
         $properties = new ServiceProperties();
         $properties->setServiceName(Utilities::tryGetValue($value, Resources::XTAG_SERVICE_NAME));
         $properties->setUrl(Utilities::tryGetValue($value, Resources::XTAG_URL));
         $result->_storageServices[] = $properties;
     }
     return $result;
 }
开发者ID:pankajadhyapak,项目名称:um_new,代码行数:20,代码来源:ListStorageServicesResult.php

示例5: create

 /**
  * Creates GetAffinityGroupPropertiesResult from parsed response into array.
  * 
  * @param array $parsed The parsed HTTP response body.
  * 
  * @return GetAffinityGroupPropertiesResult
  */
 public static function create($parsed)
 {
     $result = new self();
     $hostedServices = Utilities::tryGetArray(Resources::XTAG_HOSTED_SERVICES, $parsed);
     $storageServices = Utilities::tryGetArray(Resources::XTAG_STORAGE_SERVICES, $parsed);
     $result->_affinityGroup = new AffinityGroup($parsed);
     foreach ($hostedServices as $value) {
         $service = new HostedService($value);
         $result->_hostedServices[] = $service;
     }
     foreach ($storageServices as $value) {
         $service = new StorageService($value);
         $result->_storageServices[] = $service;
     }
     return $result;
 }
开发者ID:southworkscom,项目名称:azure-sdk-for-php,代码行数:23,代码来源:GetAffinityGroupPropertiesResult.php

示例6: create

 /**
  * Creates GetAffinityGroupPropertiesResult from parsed response into array.
  * 
  * @param array $parsed The parsed HTTP response body.
  * 
  * @return GetAffinityGroupPropertiesResult 
  */
 public static function create($parsed)
 {
     $result = new GetAffinityGroupPropertiesResult();
     $hostedServices = Utilities::tryGetArray(Resources::XTAG_HOSTED_SERVICES, $parsed);
     $storageServices = Utilities::tryGetArray(Resources::XTAG_STORAGE_SERVICES, $parsed);
     $result->_affinityGroup = new AffinityGroup($parsed);
     foreach ($hostedServices as $value) {
         $service = new ServiceProperties();
         $service->setServiceName(Utilities::tryGetValue($value, Resources::XTAG_SERVICE_NAME));
         $service->setUrl(Utilities::tryGetValue($value, Resources::XTAG_URL));
         $result->_hostedServices[] = $service;
     }
     foreach ($storageServices as $value) {
         $service = new ServiceProperties();
         $service->setServiceName(Utilities::tryGetValue($value, Resources::XTAG_SERVICE_NAME));
         $service->setUrl(Utilities::tryGetValue($value, Resources::XTAG_URL));
         $result->_storageServices[] = $service;
     }
     return $result;
 }
开发者ID:southworkscom,项目名称:vscom,代码行数:27,代码来源:GetAffinityGroupPropertiesResult.php

示例7: create

 /**
  * Creates a new Deployment from parsed response body.
  * 
  * @param array $parsed The parsed response body in array representation.
  * 
  * @return Deployment
  */
 public static function create($parsed)
 {
     $result = new Deployment();
     $name = Utilities::tryGetValue($parsed, Resources::XTAG_NAME);
     $label = Utilities::tryGetValue($parsed, Resources::XTAG_LABEL);
     $url = Utilities::tryGetValue($parsed, Resources::XTAG_URL);
     $locked = Utilities::tryGetValue($parsed, Resources::XTAG_LOCKED);
     $rollbackAllowed = Utilities::tryGetValue($parsed, Resources::XTAG_ROLLBACK_ALLOWED);
     $sdkVersion = Utilities::tryGetValue($parsed, Resources::XTAG_SDK_VERSION);
     $inputEndpointList = Utilities::tryGetKeysChainValue($parsed, Resources::XTAG_INPUT_ENDPOINT_LIST, Resources::XTAG_INPUT_ENDPOINT);
     $roleList = Utilities::tryGetKeysChainValue($parsed, Resources::XTAG_ROLE_LIST, Resources::XTAG_ROLE);
     $roleInstanceList = Utilities::tryGetKeysChainValue($parsed, Resources::XTAG_ROLE_INSTANCE_LIST, Resources::XTAG_ROLE_INSTANCE);
     $status = Utilities::tryGetValue($parsed, Resources::XTAG_STATUS);
     $slot = Utilities::tryGetValue($parsed, Resources::XTAG_DEPLOYMENT_SLOT);
     $privateId = Utilities::tryGetValue($parsed, Resources::XTAG_PRIVATE_ID);
     $configuration = Utilities::tryGetValue($parsed, Resources::XTAG_CONFIGURATION);
     $upgradeDomainCount = Utilities::tryGetValue($parsed, Resources::XTAG_UPGRADE_DOMAIN_COUNT);
     $upgradeStatus = Utilities::tryGetArray(Resources::XTAG_UPGRADE_STATUS, $parsed);
     $result->setConfiguration($configuration);
     $result->setLabel($label);
     $result->setLocked(Utilities::toBoolean($locked));
     $result->setName($name);
     $result->setPrivateId($privateId);
     $result->setRollbackAllowed(Utilities::toBoolean($rollbackAllowed));
     $result->setSdkVersion($sdkVersion);
     $result->setSlot($slot);
     $result->setStatus($status);
     $result->setUpgradeDomainCount(intval($upgradeDomainCount));
     $result->setUpgradeStatus(UpgradeStatus::create($upgradeStatus));
     $result->setUrl($url);
     $result->setRoleInstanceList(Utilities::createInstanceList(Utilities::getArray($roleInstanceList), 'WindowsAzure\\ServiceManagement\\Models\\RoleInstance'));
     $result->setRoleList(Utilities::createInstanceList(Utilities::getArray($roleList), 'WindowsAzure\\ServiceManagement\\Models\\Role'));
     $result->setInputEndpointList(Utilities::createInstanceList(Utilities::getArray($inputEndpointList), 'WindowsAzure\\ServiceManagement\\Models\\InputEndpoint'));
     return $result;
 }
开发者ID:azt3k,项目名称:drupal-azure-blob,代码行数:42,代码来源:Deployment.php


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