getPriority() public method

Returns the "priority" attribute value of this element, if the attribute is present. Returns null if not.
public getPriority ( ) : mixed
return mixed $result Null or integer, depending on whether this Service element has a 'priority' attribute.
示例#1
0
 /**
  * Creates the service list using nodes from the XRDS XML
  * document.
  *
  * @access private
  */
 function _parse()
 {
     $this->serviceList = array();
     $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);
     /*
      * Keyboard Monkeys modification:
      * Assigning the return value of new by reference is deprecated
      */
     foreach ($services as $node) {
         $s = new Auth_Yadis_Service();
         $s->element = $node;
         $s->parser = $this->parser;
         $priority = $s->getPriority();
         if ($priority === null) {
             $priority = SERVICES_YADIS_MAX_PRIORITY;
         }
         $this->_addService($priority, $s);
     }
 }
示例#2
0
 /**
  * Creates the service list using nodes from the XRDS XML
  * document.
  *
  * @access private
  */
 function _parse()
 {
     $this->serviceList = array();
     $services = $this->parser->evalXPath('xrd:Service', $this->xrdNode);
     foreach ($services as $node) {
         $s = new Auth_Yadis_Service();
         $s->element = $node;
         $s->parser =& $this->parser;
         $priority = $s->getPriority();
         if ($priority === null) {
             $priority = SERVICES_YADIS_MAX_PRIORITY;
         }
         $this->_addService($priority, $s);
     }
 }