Auth_OpenID_ServiceEndpoint::getLocalID PHP Method

getLocalID() public method

public getLocalID ( )
    function getLocalID()
    {
        // Return the identifier that should be sent as the
        // openid.identity_url parameter to the server.
        if ($this->local_id === null && $this->canonicalID === null) {
            return $this->claimed_id;
        } else {
            if ($this->local_id) {
                return $this->local_id;
            } else {
                return $this->canonicalID;
            }
        }
    }

Usage Example

 function test_useCanonicalID()
 {
     $endpoint = new Auth_OpenID_ServiceEndpoint();
     $endpoint->claimed_id = Auth_Yadis_XRI("=!1000");
     $endpoint->canonicalID = Auth_Yadis_XRI("=!1000");
     $htis->assertEquals($endpoint->getLocalID(), Auth_Yadis_XRI("=!1000"));
 }