Services_Yadis
[ class tree: Services_Yadis ] [ index: Services_Yadis ] [ all elements ]

Class: Services_Yadis_Xrds

Source Location: /Services_Yadis-0.5.1/Services/Yadis/Xrds.php

Class Overview


The Services_Yadis_Xrds class is a wrapper for elements of an XRD document which is parsed using SimpleXML, and contains methods for retrieving data about the document. The concrete aspects of retrieving specific data elements is left to a concrete subclass.


Author(s):

  • Pádraic Brady (http://blog.astrumfutura.com)

Variables

Methods


Child classes:

Services_Yadis_Xrds_Service
The Services_Yadis_Xrds_Service class is a wrapper for Service elements of an XRD document which is parsed using SimpleXML, and contains methods for retrieving data about each Service, including Type, Url and other arbitrary data added in a separate namespace, e.g. openid:Delegate for OpenID 1.1.

Inherited Variables

Inherited Methods


Class Details

[line 59]
The Services_Yadis_Xrds class is a wrapper for elements of an XRD document which is parsed using SimpleXML, and contains methods for retrieving data about the document. The concrete aspects of retrieving specific data elements is left to a concrete subclass.
  • Author: Pádraic Brady (http://blog.astrumfutura.com)
  • License: New BSD License


[ Top ]


Class Variables

$_currentKey =  0

[line 67]

Current key/pointer for the Iterator
  • Access: protected

Type:   integer


[ Top ]

$_namespace =  null

[line 82]

Instance of Services_Yadis_Xrds_Namespace for managing namespaces associated with an XRDS document.
  • Access: protected



[ Top ]

$_xrdNodes =  null

[line 74]

Contains the valid xrd:XRD nodes parsed from the XRD document.
  • Access: protected

Type:   SimpleXMLElement


[ Top ]



Method Detail

__construct (Constructor)   [line 93]

Services_Yadis_Xrds __construct( $xrds, Services_Yadis_Xrds_Namespace $namespace)

Constructor; parses and validates an XRD document. All access to the data held in the XML is left to a concrete subclass specific to expected XRD format and data types.

Cannot be directly instantiated; must call from subclass.

  • Access: protected

Overridden in child classes as:

Services_Yadis_Xrds_Service::__construct()
Constructor; Accepts an XRD document for parsing.

Parameters:

SimpleXMLElement   $xrds     
Services_Yadis_Xrds_Namespace   $namespace     

[ Top ]

addNamespace   [line 125]

Services_Yadis addNamespace( string $namespace, string $namespaceUrl)

Add a single namespace to be utilised by the XML parser when it receives a valid XRD document.
  • Access: public

Parameters:

string   $namespace     
string   $namespaceUrl     

[ Top ]

addNamespaces   [line 111]

Services_Yadis addNamespaces( $namespaces)

Add a list (array) of additional namespaces to be utilised by the XML parser when it receives a valid XRD document.
  • Access: public

Parameters:

array   $namespaces     

[ Top ]

getNamespace   [line 136]

string|boolean getNamespace( $namespace)

Return the value of a specific namespace.
  • Access: public

Parameters:

   $namespace     

[ Top ]

getNamespaces   [line 146]

array getNamespaces( )

Returns an array of all currently set namespaces.
  • Access: public

[ Top ]

sortByPriority   [line 226]

array sortByPriority( $unsorted)

Order an array of elements by priority. This assumes an array form of:

$array[$priority] = <array of elements with equal priority> Where multiple elements are assigned to a priority, their order in the priority array should be made random. After ordering, the array is flattened to a single array of elements for iteration.

  • Access: public

Parameters:

array   $unsorted     

[ Top ]

_getValidXrdNodes   [line 157]

array _getValidXrdNodes( $xrds)

Returns an array of all xrd elements located in the XRD document.
  • Access: protected

Parameters:

SimpleXMLElement   $xrds     

[ Top ]


Documentation generated on Sat, 01 Jan 2011 22:30:03 +0000 by phpDocumentor 1.4.3. PEAR Logo Copyright © PHP Group 2004.