class SimplePie implements SetLoggerInterface (View source)

SimplePie\SimplePie is the primary entry point for SimplePie NG.

Traits

Shared code for working with the logger.

Properties

protected LoggerInterface $logger A PSR-3 logger. from LoggerTrait
protected int $libxml Bitwise libxml options to use for parsing XML.
protected HandlerStackInterface $middleware The handler stack which contains registered middleware.

Methods

setLogger(LoggerInterface $logger)

Sets the PSR-3 logger.

getLogger()

Retrieves the PSR-3 logger.

__construct()

Constructs a new instance of this class.

int
setLibxml(int $libxml)

Sets the libxml value to use for parsing XML.

int
getLibxml()

Gets the libxml value to use for parsing XML.

setMiddlewareStack(HandlerStackInterface $handlerStack)

Sets the handler stack which contains registered middleware.

getMiddlewareStack()

Gets the handler stack which contains registered middleware.

Xml
parseXml(StreamInterface $stream, bool $handleHtmlEntitiesInXml = false)

Parses content which is known to be valid XML and is encoded as UTF-8.

Details

LoggerTrait setLogger(LoggerInterface $logger)

Sets the PSR-3 logger.

Parameters

LoggerInterface $logger A PSR-3 compatible logger.

Return Value

LoggerTrait

LoggerInterface getLogger()

Retrieves the PSR-3 logger.

Return Value

LoggerInterface

__construct()

Constructs a new instance of this class.

int setLibxml(int $libxml)

Sets the libxml value to use for parsing XML.

Parameters

int $libxml TODO add a description here.

Return Value

int

int getLibxml()

Gets the libxml value to use for parsing XML.

Return Value

int

SimplePie setMiddlewareStack(HandlerStackInterface $handlerStack)

Sets the handler stack which contains registered middleware.

Parameters

HandlerStackInterface $handlerStack TODO add a description here.

Return Value

SimplePie

HandlerStackInterface getMiddlewareStack()

Gets the handler stack which contains registered middleware.

Return Value

HandlerStackInterface

Xml parseXml(StreamInterface $stream, bool $handleHtmlEntitiesInXml = false)

Parses content which is known to be valid XML and is encoded as UTF-8.

Parameters

StreamInterface $stream A PSR-7 StreamInterface which is typically returned by the getBody() method of a ResponseInterface class.
bool $handleHtmlEntitiesInXml Whether or not SimplePie should pre-parse the XML as HTML to resolve the entities. A value of true means that SimplePie should inject the entity definitions. A value of false means that SimplePie should NOT inject the entity definitions. The default value is false.

Return Value

Xml