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

Class: Services_Yadis_Xrds_Service

Source Location: /Services_Yadis-0.5.2/Services/Yadis/Xrds/Service.php

Class Overview

Services_Yadis_Xrds
   |
   --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.


Author(s):

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

Variables

Methods


Inherited Variables

Inherited Methods

Class: Services_Yadis_Xrds

Services_Yadis_Xrds::__construct()
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.
Services_Yadis_Xrds::addNamespace()
Add a single namespace to be utilised by the XML parser when it receives a valid XRD document.
Services_Yadis_Xrds::addNamespaces()
Add a list (array) of additional namespaces to be utilised by the XML parser when it receives a valid XRD document.
Services_Yadis_Xrds::getNamespace()
Return the value of a specific namespace.
Services_Yadis_Xrds::getNamespaces()
Returns an array of all currently set namespaces.
Services_Yadis_Xrds::sortByPriority()
Order an array of elements by priority. This assumes an array form of:
Services_Yadis_Xrds::_getValidXrdNodes()
Returns an array of all xrd elements located in the XRD document.

Class Details

[line 65]
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.

This class extends the basic Services_Yadis_Xrds wrapper to implement a Service object specific to the Yadis Specification 1.0. XRDS itself is not an XML format ruled by Yadis, but by an OASIS proposal.

  • Author: Pádraic Brady (http://blog.astrumfutura.com)
  • License: New BSD License


[ Top ]


Class Variables

$_services = array()

[line 87]

The Yadis Services resultset
  • Access: protected

Type:   array


[ Top ]

$_valid =  true

[line 94]

Flag holding whether or not the array endpoint has been reached.
  • Access: protected

Type:   boolean


[ Top ]

$_xrdNode =  null

[line 80]

Holds the last XRD node of the XRD document as required by Yadis 1.0.
  • Access: protected

Type:   SimpleXMLElement


[ Top ]



Method Detail

__construct (Constructor)   [line 104]

Services_Yadis_Xrds_Service __construct( SimpleXMLElement $xrds, Services_Yadis_Xrds_Namespace $namespace)

Constructor; Accepts an XRD document for parsing.

Parses the XRD document by <xrd:Service> element to construct an array of Services_Yadis_Service objects ordered by their priority.

  • Access: public

Overrides Services_Yadis_Xrds::__construct() (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.)

Parameters:

SimpleXMLElement   $xrds   — 
Services_Yadis_Xrds_Namespace   $namespace   — 

[ Top ]

current   [line 130]

Services_Yadis_Service current( )

Implements Iterator::current()

Return the current element.

  • Access: public

[ Top ]

key   [line 142]

integer key( )

Implements Iterator::key()

Return the key of the current element.

  • Access: public

[ Top ]

next   [line 154]

void next( )

Implements Iterator::next()

Increments pointer to next Service object.

  • Access: public

[ Top ]

rewind   [line 166]

boolean rewind( )

Implements Iterator::rewind()

Rewinds the Iterator to the first Service object

  • Access: public

[ Top ]

valid   [line 176]

boolean valid( )

Implement Iterator::valid()
  • Access: public

[ Top ]

_addService   [line 188]

void _addService( Services_Yadis_Service $service)

Add a service to the Service list indexed by priority. Assumes a missing or invalid priority should be shuffled to the bottom of the priority order.
  • Access: protected

Parameters:

Services_Yadis_Service   $service   — 

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:57:15 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.