This object is used to parse stream (rss, atom, rdf, dc)

uses xml entities and M$ bad chars conversion
uses the exceptions handler
uses the parsed stream
uses check HTMLPurifier cache directory
uses get the stream source
uses translate errors
package OWR
subpackage Stream
used_by \OWR\CLI\Controller
used_by \OWR\Model\Streams

 Methods

Constructor Create the filter if not already done and defines the differents streams' trees

__construct() 
access public
author Pierre-Alain Mignot

Returns the parsed stream

export() : mixed
access public
author Pierre-Alain Mignot

Returns

mixedthe stream (as a StreamReader object) if exists, or false

Returns the number of parsed streams

getCount() : float
Static
access public
author Pierre-Alain Mignot

Returns

float$_nbParsedStreams

Returns the source of the remote stream

getSrc(string $url) : string
access public
author Pierre-Alain Mignot

Parameters

$url

string

the url of the stream

Returns

stringthe source

Returns the added microtime of all streams parsing time

getTime() : float
Static
access public
author Pierre-Alain Mignot

Returns

float$_parseTime

Parse the stream

parse(string $uri, string $src) : boolean
access public
author Pierre-Alain Mignot

Parameters

$uri

string

the uri of the stream to parse

$src

string

the source, optionnal

Returns

booleantrue on success

Cleaning function This function replaces some HTML and purify value

_clean(string $data) 
access private
author Pierre-Alain Mignot

Parameters

$data

string

the data to clean

Sets the host of the stream

_getUri(string $uri) 
access public
author Pierre-Alain Mignot

Parameters

$uri

string

the uri to parse

Parse XML like HTML

_parseHTML() : string
access private
author Pierre-Alain Mignot

Returns

string$html

 Properties

 

number of parsed streams

$_nbParsedStreams : int
access protected
static
 

time of stream parsing

$_parseTime : float
access protected
static
 

host of the stream

$_currentHost : string
access private
 

current node

$_currentNode : array
access private
 

instance of HTMLPurifier

$_filter : mixed
access private
static
 

current stream is atom

$_isAtom : boolean
access private
 

current stream is rdf

$_isRDF : boolean
access private
 

number of items in stream

$_itemCount : int
access private
 

current node name

$_localName : string
access private
 

nodes tree

$_nodeTree : array
access private
 

parsed stream

$_stream : array
access private
 

list of streams structure (rss, atom, dc, rdf)

$_trees : array
access private