]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - extlib/Auth/Yadis/XRDS.php
Update the (formerly) Janrain OpenID library to 2.2.2 -- bug fixes including PHP...
[quix0rs-gnu-social.git] / extlib / Auth / Yadis / XRDS.php
index f14a7948e1a4379e61da6b1be9b3493182129d48..1f5af96fb21a69c0dcc0641fde44567eb72e9a24 100644 (file)
@@ -255,11 +255,11 @@ class Auth_Yadis_XRDS {
      * Instantiate a Auth_Yadis_XRDS object.  Requires an XPath
      * instance which has been used to parse a valid XRDS document.
      */
-    function Auth_Yadis_XRDS(&$xmlParser, &$xrdNodes)
+    function Auth_Yadis_XRDS($xmlParser, $xrdNodes)
     {
-        $this->parser =& $xmlParser;
+        $this->parser = $xmlParser;
         $this->xrdNode = $xrdNodes[count($xrdNodes) - 1];
-        $this->allXrdNodes =& $xrdNodes;
+        $this->allXrdNodes = $xrdNodes;
         $this->serviceList = array();
         $this->_parse();
     }
@@ -273,7 +273,7 @@ class Auth_Yadis_XRDS {
      * @return mixed $xrds An instance of Auth_Yadis_XRDS or null,
      * depending on the validity of $xml_string
      */
-    function &parseXRDS($xml_string, $extra_ns_map = null)
+    static function parseXRDS($xml_string, $extra_ns_map = null)
     {
         $_null = null;
 
@@ -352,9 +352,9 @@ class Auth_Yadis_XRDS {
         $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);
 
         foreach ($services as $node) {
-            $s =& new Auth_Yadis_Service();
+            $s = new Auth_Yadis_Service();
             $s->element = $node;
-            $s->parser =& $this->parser;
+            $s->parser = $this->parser;
 
             $priority = $s->getPriority();
 
@@ -428,7 +428,8 @@ class Auth_Yadis_XRDS {
                 $matches = 0;
 
                 foreach ($filters as $filter) {
-                    if (call_user_func_array($filter, array($service))) {
+
+                    if (call_user_func_array($filter, array(&$service))) {
                         $matches++;
 
                         if ($filter_mode == SERVICES_YADIS_MATCH_ANY) {
@@ -475,4 +476,3 @@ class Auth_Yadis_XRDS {
     }
 }
 
-?>
\ No newline at end of file