Class: Services_Yadis
Source Location: /Services_Yadis-0.2.2/Yadis.php
Services_Yadis class
Author(s):
- Pádraic Brady (http://blog.astrumfutura.com)
|
|
|
Inherited Variables
|
Inherited Methods
|
Class Details
Class Variables
Method Detail
__construct (Constructor) [line 212]
Services_Yadis __construct(
[string
$yadisId = null], [array
$namespaces = null])
|
|
Class Constructor Allows settings of the initial Yadis ID (an OpenID URL for example) and an optional list of additional namespaces. For example, OpenID uses a namespace such as: xmlns:openid="http://openid.net/xmlns/1.0" Namespaces are assigned to a Services_Yadis_Xrds_Namespace container object to be passed more easily to other objects being
Parameters:
addNamespace [line 361]
Add a single namespace to be utilised by the XML parser when it receives a valid XRD document.
Parameters:
addNamespaces [line 347]
Add a list (array) of additional namespaces to be utilised by the XML parser when it receives a valid XRD document.
Parameters:
discover [line 396]
Performs Service Discovery, i.e. the requesting and parsing of a valid Yadis (XRD) document into a list of Services and Service Data. The return value will be an instance of Services_Yadis_Xrds which will implement SeekableIterator. Returns FALSE on failure.
getHttpRequest [line 488]
void getHttpRequest(
HTTP_Request
$request)
|
|
Setter for custom HTTP_Request type object
Parameters:
getHttpRequestOptions [line 243]
array getHttpRequestOptions(
)
|
|
Get options to be passed to the PEAR HTTP_Request constructor
getNamespace [line 372]
string|null getNamespace(
$namespace)
|
|
Return the value of a specific namespace.
Parameters:
getNamespaces [line 382]
Returns an array of all currently set namespaces.
getUserResponse [line 463]
string|boolean getUserResponse(
)
|
|
Return the very first response received when using a valid Yadis URL. This is important for Services, like OpenID, which can attempt a fallback solution in case Yadis fails, and the response came from a user's personal URL acting as an alias.
getYadisId [line 270]
Returns the original Yadis ID string set for this class.
getYadisUrl [line 331]
Returns the Yadis URL. This will usually be identical to the Yadis ID, unless the Yadis ID (in the future) was one of IRI, XRI or i-name which required transformation to a valid URI.
setHttpRequest [line 477]
void setHttpRequest(
HTTP_Request
$request)
|
|
Setter for custom HTTP_Request type object
Parameters:
setHttpRequestOptions [line 233]
void setHttpRequestOptions(
array
$options)
|
|
Set options to be passed to the PEAR HTTP_Request constructor
Parameters:
setYadisId [line 259]
void setYadisId(
string
$yadisId)
|
|
A Yadis ID is usually an URL, but can also include an IRI, or XRI i-name. The initial version will support URLs as standard before examining options for supporting alternatives (IRI,XRI,i-name) since they require additional validation and conversion steps (e.g. Punycode for IRI) before use. Note: The current Validate classes currently do not have complete IDNA validation support for Internationalised Domain Names. To be addressed.
Parameters:
setYadisUrl [line 288]
Attempts to create a valid URI based on the value of the parameter which would typically be the Yadis ID. Note: This currently only supports XRI transformations.
Parameters:
_get [line 522]
HTTP_Request _get(
string
$url)
|
|
Use the HTTP_Request to issue an HTTP GET request carrying the "Accept" header value of "application/xrds+xml". This can allow servers to quickly respond with a valid XRD document rather than forcing the client to follow the X-XRDS-Location bread crumb trail.
Parameters:
_getResponseType [line 501]
integer _getResponseType(
HTTP_Request
$request)
|
|
Run any instance of HTTP_Request through a set of filters to determine the Yadis Response type which in turns determines how the response should be reacted to or dealt with.
Parameters:
_isMetaHttpEquiv [line 590]
boolean _isMetaHttpEquiv(
HTTP_Request
$request)
|
|
Assuming this user is hosting a third party sourced identity under an alias personal URL, we'll need to check if the website's HTML body has a http-equiv meta element with a content attribute pointing to where we can fetch the XRD document.
Parameters:
_isXrdsContentType [line 572]
boolean _isXrdsContentType(
HTTP_Request
$request)
|
|
Checks whether the Response contains the XRDS resource. It should, per the specifications always be served as application/xrds+xml
Parameters:
_isXrdsLocationHeader [line 547]
boolean _isXrdsLocationHeader(
HTTP_Request
$request)
|
|
Checks whether the Response contains headers which detail where we can find the XRDS resource for this user. If exists, the value is set to the private $_xrdsLocationHeaderUrl property.
Parameters:
_parseXrds [line 639]
Creates a new Services_Yadis_Xrds object which uses SimpleXML to parse the XML into a list of Iterable Services_Yadis_Service objects.
Parameters:
Documentation generated on Mon, 11 Mar 2019 15:26:52 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.
|
|