Auth_OpenID_Message::fromKVForm PHP Method

fromKVForm() static public method

static public fromKVForm ( $kvform_string )
    static function fromKVForm($kvform_string)
    {
        // Create a Message from a KVForm string
        return Auth_OpenID_Message::fromOpenIDArgs(Auth_OpenID_KVForm::toArray($kvform_string));
    }

Usage Example

Example #1
0
 /**
  * Adapt a POST response to a Message.
  *
  * @param $response Result of a POST to an OpenID endpoint.
  *
  * @access private
  */
 static function _httpResponseToMessage($response, $server_url)
 {
     // Should this function be named Message.fromHTTPResponse instead?
     $response_message = Auth_OpenID_Message::fromKVForm($response->body);
     if ($response->status == 400) {
         return Auth_OpenID_ServerErrorContainer::fromMessage($response_message);
     } else {
         if ($response->status != 200 and $response->status != 206) {
             return null;
         }
     }
     return $response_message;
 }
All Usage Examples Of Auth_OpenID_Message::fromKVForm