src/ServiceRuntime/Internal/XmlRoleEnvironmentDataDeserializer.php
private function _translateRoleInstanceEndpoints($endpointsInfo)
    {
        $endpointsMap = [];

        $endpoints = $endpointsInfo;
        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [0 => $endpointsInfo];
        }

        foreach ($endpoints as $endpoint) {
            $roleInstanceEndpoint = new RoleInstanceEndpoint(
                $endpoint['@attributes']['protocol'],
                $endpoint['@attributes']['address'],
                intval($endpoint['@attributes']['port'], 10)
            );

            $endpointsMap[$endpoint['@attributes']['name']] = $roleInstanceEndpoint;
        }

        return $endpointsMap;
    }
private function _translateRoleInstanceEndpoints($endpointsInfo)
    {
        $endpointsMap = [];

        $endpoints = $endpointsInfo;
        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [0 => $endpointsInfo];
        }

        foreach ($endpoints as $endpoint) {
            $roleInstanceEndpoint = new RoleInstanceEndpoint(
                $endpoint['@attributes']['protocol'],
                $endpoint['@attributes']['address'],
                intval($endpoint['@attributes']['port'], 10)
            );

            $endpointsMap[$endpoint['@attributes']['name']] = $roleInstanceEndpoint;
        }

        return $endpointsMap;
    }
private function _translateRoleInstanceEndpoints ( $ endpointsInfo ) { $ endpointsMap = [ ] ; $ endpoints = $ endpointsInfo ; if ( array_key_exists ( '@attributes' , $ endpoints ) ) { $ endpoints = [ 0 => $ endpointsInfo ] ; } foreach ( $ endpoints as $ endpoint ) { $ roleInstanceEndpoint = new RoleInstanceEndpoint ( $ endpoint [ '@attributes' ] [ 'protocol' ] , $ endpoint [ '@attributes' ] [ 'address' ] , intval ( $ endpoint [ '@attributes' ] [ 'port' ] , 10 ) ) ; $ endpointsMap [ $ endpoint [ '@attributes' ] [ 'name' ] ] = $ roleInstanceEndpoint ; } return $ endpointsMap ; }
Translates the role instance endpoints.

@param string $endpointsInfo The endpoints info

@return RoleInstanceEndpoint[]
Translates the role instance endpoints .