summaryrefslogtreecommitdiffstats
path: root/Auth
diff options
context:
space:
mode:
authortailor <cygnus@janrain.com>2007-03-02 23:00:55 +0000
committertailor <cygnus@janrain.com>2007-03-02 23:00:55 +0000
commitdcc73a27864c2f21f16c97b000e7168653206a2e (patch)
treeee1ee854cbca69ecbc0a0cbd236912b1d939d534 /Auth
parent9a50f5d16036586895b50ec56bc030e0e6ae1fbc (diff)
downloadphp-openid-dcc73a27864c2f21f16c97b000e7168653206a2e.zip
php-openid-dcc73a27864c2f21f16c97b000e7168653206a2e.tar.gz
php-openid-dcc73a27864c2f21f16c97b000e7168653206a2e.tar.bz2
[project @ Added Auth_OpenID_Message:getAliasedArg]
Diffstat (limited to 'Auth')
-rw-r--r--Auth/OpenID/Message.php19
1 files changed, 19 insertions, 0 deletions
diff --git a/Auth/OpenID/Message.php b/Auth/OpenID/Message.php
index 3dd919c..520f6d4 100644
--- a/Auth/OpenID/Message.php
+++ b/Auth/OpenID/Message.php
@@ -796,6 +796,25 @@ class Auth_OpenID_Message {
return false;
}
}
+
+ function getAliasedArg($aliased_key, $default = null)
+ {
+ $parts = explode('.', $aliased_key, 2);
+
+ if (count($parts) != 2) {
+ $ns = null;
+ } else {
+ list($alias, $key) = $parts;
+ $ns = $this->namespaces->getNamespaceURI($alias);
+ }
+
+ if ($ns === null) {
+ $key = $aliased_key;
+ $ns = $this->getOpenIDNamespace();
+ }
+
+ return $this->getArg($ns, $key, $default);
+ }
}
?> \ No newline at end of file