public function readRegistration(RegistrationInterface $registration)
    {
        if (!$registration->getRegistrationId()) {
            throw new \RuntimeException('Registration ID is mandatory.');
        }

        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;

        $token = $this->generateSasToken($uri);
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());

        $response = $this->request(self::METHOD_GET, $uri, $headers);

        return $registration->scrapeResponse($response);
    }
public function readRegistration(RegistrationInterface $registration)
    {
        if (!$registration->getRegistrationId()) {
            throw new \RuntimeException('Registration ID is mandatory.');
        }

        $uri = $registration->buildUri($this->endpoint, $this->hubPath).self::API_VERSION;

        $token = $this->generateSasToken($uri);
        $headers = array_merge(['Authorization: '.$token], $registration->getHeaders());

        $response = $this->request(self::METHOD_GET, $uri, $headers);

        return $registration->scrapeResponse($response);
    }
public function readRegistration ( RegistrationInterface $ registration ) { if ( ! $ registration -> getRegistrationId ( ) ) { throw new \ RuntimeException ( 'Registration ID is mandatory.' ) ; } $ uri = $ registration -> buildUri ( $ this -> endpoint , $ this -> hubPath ) . self :: API_VERSION ; $ token = $ this -> generateSasToken ( $ uri ) ; $ headers = array_merge ( [ 'Authorization: ' . $ token ] , $ registration -> getHeaders ( ) ) ; $ response = $ this -> request ( self :: METHOD_GET , $ uri , $ headers ) ; return $ registration -> scrapeResponse ( $ response ) ; }
Read Registration.

@param RegistrationInterface $registration

@throws \RuntimeException

@return mixed
Read Registration .