You are here

function xrds_priority in Lingotek Translation 7.5

Same name and namespace in other branches
  1. 7.7 lib/oauth-php/library/discovery/xrds_parse.php \xrds_priority()
  2. 7.2 lib/oauth-php/library/discovery/xrds_parse.php \xrds_priority()
  3. 7.3 lib/oauth-php/library/discovery/xrds_parse.php \xrds_priority()
  4. 7.4 lib/oauth-php/library/discovery/xrds_parse.php \xrds_priority()
  5. 7.6 lib/oauth-php/library/discovery/xrds_parse.php \xrds_priority()

Fetch the priority of a element

Parameters

DOMElement elt:

Return value

mixed 'null' or int

1 call to xrds_priority()
xrds_oauth_service_uris in lib/oauth-php/library/discovery/xrds_parse.php
Return the OAuth service uris in order of the priority.

File

lib/oauth-php/library/discovery/xrds_parse.php, line 284

Code

function xrds_priority($elt) {
  if ($elt
    ->hasAttribute('priority')) {
    $prio = $elt
      ->getAttribute('priority');
    if (is_numeric($prio)) {
      $prio = intval($prio);
    }
  }
  else {
    $prio = 'null';
  }
  return $prio;
}