src/ServiceRuntime/Internal/RuntimeVersionProtocolClient.php
public function getVersionMap($connectionPath)
    {
        $versions = [];

        $input = $this->_inputChannel->getInputStream($connectionPath);
        $contents = stream_get_contents($input);

        $discoveryInfo = Utilities::unserialize($contents);

        $endpoints = $discoveryInfo['RuntimeServerEndpoints']
            ['RuntimeServerEndpoint'];

        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [];
            $endpoints[] = $discoveryInfo
                ['RuntimeServerEndpoints']['RuntimeServerEndpoint'];
        }

        foreach ($endpoints as $endpoint) {
            $versions[$endpoint['@attributes']['version']] = $endpoint
                ['@attributes']['path'];
        }

        return $versions;
    }
public function getVersionMap($connectionPath)
    {
        $versions = [];

        $input = $this->_inputChannel->getInputStream($connectionPath);
        $contents = stream_get_contents($input);

        $discoveryInfo = Utilities::unserialize($contents);

        $endpoints = $discoveryInfo['RuntimeServerEndpoints']
            ['RuntimeServerEndpoint'];

        if (array_key_exists('@attributes', $endpoints)) {
            $endpoints = [];
            $endpoints[] = $discoveryInfo
                ['RuntimeServerEndpoints']['RuntimeServerEndpoint'];
        }

        foreach ($endpoints as $endpoint) {
            $versions[$endpoint['@attributes']['version']] = $endpoint
                ['@attributes']['path'];
        }

        return $versions;
    }
public function getVersionMap ( $ connectionPath ) { $ versions = [ ] ; $ input = $ this -> _inputChannel -> getInputStream ( $ connectionPath ) ; $ contents = stream_get_contents ( $ input ) ; $ discoveryInfo = Utilities :: unserialize ( $ contents ) ; $ endpoints = $ discoveryInfo [ 'RuntimeServerEndpoints' ] [ 'RuntimeServerEndpoint' ] ; if ( array_key_exists ( '@attributes' , $ endpoints ) ) { $ endpoints = [ ] ; $ endpoints [ ] = $ discoveryInfo [ 'RuntimeServerEndpoints' ] [ 'RuntimeServerEndpoint' ] ; } foreach ( $ endpoints as $ endpoint ) { $ versions [ $ endpoint [ '@attributes' ] [ 'version' ] ] = $ endpoint [ '@attributes' ] [ 'path' ] ; } return $ versions ; }
Gets the version map.

@param string $connectionPath The connection path

@return array
Gets the version map .