Documentation

SimplePie_Registry
in package

Table of Contents

Properties

$classes  : mixed
$default  : mixed
$legacy  : mixed

Methods

__construct()  : mixed
call()  : mixed
Call a static method for a type
create()  : object
Create a new instance of a given type
get_class()  : string|null
Get the class registered for a type
register()  : bool
Register a class

Properties

$classes

protected mixed $classes = array()

$default

protected mixed $default = array('Cache' => 'SimplePie_Cache', 'Parser' => 'SimplePie_Parser', 'Sanitize' => 'SimplePie_Sanitize', 'Item' => 'SimplePie_Item', 'Author' => 'SimplePie_Author', 'Enclosure' => 'SimplePie_Enclosure', 'Restriction' => 'SimplePie_Restriction', 'Content_Type_Sniffer' => 'SimplePie_Content_Type_Sniffer', 'Source' => 'SimplePie_Source', 'Misc' => 'SimplePie_Misc', 'XML_Declaration_Parser' => 'SimplePie_XML_Declaration_Parser', 'Parse_Date' => 'SimplePie_Parse_Date')

$legacy

protected mixed $legacy = array()

Methods

__construct()

public __construct() : mixed

call()

Call a static method for a type

public & call(string $type, string $method[, array<string|int, mixed> $parameters = array() ]) : mixed
Parameters
$type : string
$method : string
$parameters : array<string|int, mixed> = array()

create()

Create a new instance of a given type

public & create(string $type[, array<string|int, mixed> $parameters = array() ]) : object
Parameters
$type : string
$parameters : array<string|int, mixed> = array()

Parameters to pass to the constructor

Return values
object

Instance of class

get_class()

Get the class registered for a type

public get_class(string $type) : string|null

Where possible, use create() or call() instead

Parameters
$type : string
Return values
string|null

register()

Register a class

public register(string $type, string $class[, bool $legacy = false ]) : bool
Parameters
$type : string

See $default for names

$class : string

Class name, must subclass the corresponding default

$legacy : bool = false

Whether to enable legacy support for this class

Return values
bool

Successfulness


        
On this page

Search results