interface XmlInterface implements MiddlewareInterface (View source)

The interface that all XML middleware classes must implement and respond to.

Methods

void
__invoke(stdClass $feedRoot, string $namespaceAlias, DOMXPath $xpath)

The function signature for the middleware.

array
getSupportedNamespaces()

Gets the list of supported namespaces and their namespace aliases.

Details

void __invoke(stdClass $feedRoot, string $namespaceAlias, DOMXPath $xpath)

The function signature for the middleware.

Parameters

stdClass $feedRoot The root of the feed. This will be written-to when the parsing middleware runs.
string $namespaceAlias The preferred namespace alias for a given XML namespace URI. Should be the result of a call to SimplePie\Util\Ns.
DOMXPath $xpath The DOMXPath object with this middleware's namespace alias applied.

Return Value

void

array getSupportedNamespaces()

Gets the list of supported namespaces and their namespace aliases.

Returns an associative array where the key is the XML Namespace URL, and the value is the friendly alias name that the middleware can use to refer to it.

return [
    'http://www.w3.org/2005/Atom' => 'atom10'
];

Return Value

array