JanRain OpenID Library

Auth_Yadis_Service
in package

This class represents a <Service> element in an XRDS document.

Objects of this type are returned by Auth_Yadis_XRDS::services() and Auth_Yadis_Yadis::services(). Each object corresponds directly to a <Service> element in the XRDS and supplies a getElements($name) method which you should use to inspect the element's contents. See for more information on the role this class plays in Yadis discovery.

Table of Contents

$element  : mixed
$parser  : Auth_Yadis_XMLParser
getElements()  : array<string|int, mixed>
Used to get XML elements from this object's <Service> element.
getPriority()  : mixed
Returns the "priority" attribute value of this <Service> element, if the attribute is present. Returns null if not.
getTypes()  : array<string|int, mixed>
Return the URIs in the "Type" elements, if any, of this Service element.
getURIs()  : array<string|int, mixed>
Return the URIs in the "URI" elements, if any, of this Service element. The URIs are returned sorted in priority order.
matchTypes()  : mixed

Properties

$element

public mixed $element = \null

Methods

getElements()

Used to get XML elements from this object's <Service> element.

public getElements(string $name) : array<string|int, mixed>

This is what you should use to get all custom information out of this element. This is used by service filter functions to determine whether a service element contains specific tags, etc. NOTE: this only considers elements which are direct children of the <Service> element for this object.

Parameters
$name : string

The name of the element to look for

Return values
array<string|int, mixed>

$list An array of elements with the specified name which are direct children of the <Service> element. The nodes returned by this function can be passed to $this->parser methods (see ).

getPriority()

Returns the "priority" attribute value of this <Service> element, if the attribute is present. Returns null if not.

public getPriority() : mixed
Return values
mixed

$result Null or integer, depending on whether this Service element has a 'priority' attribute.

getTypes()

Return the URIs in the "Type" elements, if any, of this Service element.

public getTypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

$type_uris An array of Type URI strings.

getURIs()

Return the URIs in the "URI" elements, if any, of this Service element. The URIs are returned sorted in priority order.

public getURIs() : array<string|int, mixed>
Return values
array<string|int, mixed>

$uris An array of URI strings.

matchTypes()

public matchTypes(mixed $type_uris) : mixed
Parameters
$type_uris : mixed
Return values
mixed

Search results