Auth_OpenID_Signatory::getAssociation PHP Method

getAssociation() public method

Given an association handle, get the association from the store, or return a ServerError or null if something goes wrong.
public getAssociation ( $assoc_handle, $dumb, $check_expiration = true )
    function getAssociation($assoc_handle, $dumb, $check_expiration = true)
    {
        if ($assoc_handle === null) {
            return new Auth_OpenID_ServerError(null, "assoc_handle must not be null");
        }
        if ($dumb) {
            $key = $this->dumb_key;
        } else {
            $key = $this->normal_key;
        }
        $assoc = $this->store->getAssociation($key, $assoc_handle);
        if ($assoc !== null && $assoc->getExpiresIn() <= 0) {
            if ($check_expiration) {
                $this->store->removeAssociation($key, $assoc_handle);
                $assoc = null;
            }
        }
        return $assoc;
    }