public function createRegistrationId()
    {
        $registration = new GcmRegistration();
        // build uri
        $uri = $this->endpoint.$this->hubPath.'/registrationIDs/';

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

        $response = $this->request(self::METHOD_POST, $uri.self::API_VERSION, $headers, null, true);

        preg_match(
            '#'.$uri.'([^?]+)'.preg_quote(self::API_VERSION).'#',
            $response,
            $matches
        );

        return $matches[1];
    }
public function createRegistrationId()
    {
        $registration = new GcmRegistration();
        // build uri
        $uri = $this->endpoint.$this->hubPath.'/registrationIDs/';

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

        $response = $this->request(self::METHOD_POST, $uri.self::API_VERSION, $headers, null, true);

        preg_match(
            '#'.$uri.'([^?]+)'.preg_quote(self::API_VERSION).'#',
            $response,
            $matches
        );

        return $matches[1];
    }
public function createRegistrationId ( ) { $ registration = new GcmRegistration ( ) ; // build uri $ uri = $ this -> endpoint . $ this -> hubPath . '/registrationIDs/' ; $ token = $ this -> generateSasToken ( $ uri ) ; $ headers = array_merge ( [ 'Authorization: ' . $ token ] , $ registration -> getHeaders ( ) ) ; $ headers = array_merge ( [ 'Content-length: 0' ] , $ headers ) ; $ response = $ this -> request ( self :: METHOD_POST , $ uri . self :: API_VERSION , $ headers , null , true ) ; preg_match ( '#' . $ uri . '([^?]+)' . preg_quote ( self :: API_VERSION ) . '#' , $ response , $ matches ) ; return $ matches [ 1 ] ; }
Create Registration ID.

@return string Registration ID
Create Registration ID .