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

        $endpointsInfo = Utilities::tryGetKeysChainValue(
            $environmentInfo,
            'CurrentInstance',
            'Endpoints',
            'Endpoint'
        );

        if (!is_null($endpointsInfo)) {
            $endpoints = $this->_translateRoleInstanceEndpoints($endpointsInfo);
        }

        $currentInstance = new RoleInstance(
            $environmentInfo['CurrentInstance']['@attributes']['id'],
            $environmentInfo['CurrentInstance']['@attributes']['faultDomain'],
            $environmentInfo['CurrentInstance']['@attributes']['updateDomain'],
            $endpoints
        );

        foreach ($currentInstance->getInstanceEndpoints() as $endpoint) {
            $endpoint->setRoleInstance($currentInstance);
        }

        return $currentInstance;
    }
private function _translateCurrentInstance($environmentInfo)
    {
        $endpoints = [];

        $endpointsInfo = Utilities::tryGetKeysChainValue(
            $environmentInfo,
            'CurrentInstance',
            'Endpoints',
            'Endpoint'
        );

        if (!is_null($endpointsInfo)) {
            $endpoints = $this->_translateRoleInstanceEndpoints($endpointsInfo);
        }

        $currentInstance = new RoleInstance(
            $environmentInfo['CurrentInstance']['@attributes']['id'],
            $environmentInfo['CurrentInstance']['@attributes']['faultDomain'],
            $environmentInfo['CurrentInstance']['@attributes']['updateDomain'],
            $endpoints
        );

        foreach ($currentInstance->getInstanceEndpoints() as $endpoint) {
            $endpoint->setRoleInstance($currentInstance);
        }

        return $currentInstance;
    }
private function _translateCurrentInstance ( $ environmentInfo ) { $ endpoints = [ ] ; $ endpointsInfo = Utilities :: tryGetKeysChainValue ( $ environmentInfo , 'CurrentInstance' , 'Endpoints' , 'Endpoint' ) ; if ( ! is_null ( $ endpointsInfo ) ) { $ endpoints = $ this -> _translateRoleInstanceEndpoints ( $ endpointsInfo ) ; } $ currentInstance = new RoleInstance ( $ environmentInfo [ 'CurrentInstance' ] [ '@attributes' ] [ 'id' ] , $ environmentInfo [ 'CurrentInstance' ] [ '@attributes' ] [ 'faultDomain' ] , $ environmentInfo [ 'CurrentInstance' ] [ '@attributes' ] [ 'updateDomain' ] , $ endpoints ) ; foreach ( $ currentInstance -> getInstanceEndpoints ( ) as $ endpoint ) { $ endpoint -> setRoleInstance ( $ currentInstance ) ; } return $ currentInstance ; }
Translates the current instance info.

@param string $environmentInfo The environment info

@return RoleInstance
Translates the current instance info .