src/ServiceRuntime/Internal/XmlRoleEnvironmentDataDeserializer.php
private function _translateLocalResources($environmentInfo)
    {
        $localResourcesMap = [];

        $localResourcesInfo = Utilities::tryGetKeysChainValue(
            $environmentInfo,
            'CurrentInstance',
            'LocalResources',
            'LocalResource'
        );

        if (!is_null($localResourcesInfo)) {
            if (array_key_exists('@attributes', $localResourcesInfo)) {
                $localResourcesInfo = [0 => $localResourcesInfo];
            }

            foreach ($localResourcesInfo as $localResourceInfo) {
                $localResource = new LocalResource(
                    $localResourceInfo['@attributes']['sizeInMB'],
                    $localResourceInfo['@attributes']['name'],
                    $localResourceInfo['@attributes']['path']
                );

                $localResourcesMap[$localResource->getName()] = $localResource;
            }
        }

        return $localResourcesMap;
    }
private function _translateLocalResources($environmentInfo)
    {
        $localResourcesMap = [];

        $localResourcesInfo = Utilities::tryGetKeysChainValue(
            $environmentInfo,
            'CurrentInstance',
            'LocalResources',
            'LocalResource'
        );

        if (!is_null($localResourcesInfo)) {
            if (array_key_exists('@attributes', $localResourcesInfo)) {
                $localResourcesInfo = [0 => $localResourcesInfo];
            }

            foreach ($localResourcesInfo as $localResourceInfo) {
                $localResource = new LocalResource(
                    $localResourceInfo['@attributes']['sizeInMB'],
                    $localResourceInfo['@attributes']['name'],
                    $localResourceInfo['@attributes']['path']
                );

                $localResourcesMap[$localResource->getName()] = $localResource;
            }
        }

        return $localResourcesMap;
    }
private function _translateLocalResources ( $ environmentInfo ) { $ localResourcesMap = [ ] ; $ localResourcesInfo = Utilities :: tryGetKeysChainValue ( $ environmentInfo , 'CurrentInstance' , 'LocalResources' , 'LocalResource' ) ; if ( ! is_null ( $ localResourcesInfo ) ) { if ( array_key_exists ( '@attributes' , $ localResourcesInfo ) ) { $ localResourcesInfo = [ 0 => $ localResourcesInfo ] ; } foreach ( $ localResourcesInfo as $ localResourceInfo ) { $ localResource = new LocalResource ( $ localResourceInfo [ '@attributes' ] [ 'sizeInMB' ] , $ localResourceInfo [ '@attributes' ] [ 'name' ] , $ localResourceInfo [ '@attributes' ] [ 'path' ] ) ; $ localResourcesMap [ $ localResource -> getName ( ) ] = $ localResource ; } } return $ localResourcesMap ; }
Translates the local resources.

@param string $environmentInfo The role environment info

@return LocalResource[]
Translates the local resources .