SimplePie: PHP-based RSS and Atom feed handling
 
  • Overview
  • Demo
  • Blog
  • Download
  • Documentation
  • API Docs
  • Support
  • Issue Tracker
  • FAQ
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • SimplePie
    • API
    • Caching
    • HTTP
    • Parsing

Classes

  • SimplePie_Decode_HTML_Entities
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Registry
  • SimplePie_Sanitize

Class SimplePie_Registry

Handles creating objects and calling methods

Access this via SimplePie::get_registry()

Package: SimplePie
Copyright: 2004-2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue
License: BSD License
Author: Ryan Parman
Author: Geoffrey Sneddon
Author: Ryan McCue
Located at SimplePie/Registry.php
Methods summary
public
# __construct( )

Constructor

No-op

public boolean
# register( string $type, string $class, boolean $legacy = false )

Register a class

Parameters

$type
string
See SimplePie_Registry::$default for names
$class
string
Class name, must subclass the corresponding default
$legacy
boolean
Whether to enable legacy support for this class

Returns

boolean
Successfulness
public string|null
# get_class( string $type )

Get the class registered for a type

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

Parameters

$type
string

Returns

string|null
public object &
# create( string $type, array $parameters = array() )

Create a new instance of a given type

Parameters

$type
string
$parameters
array
Parameters to pass to the constructor

Returns

object
Instance of class
public mixed &
# call( string $type, string $method, array $parameters = array() )

Call a static method for a type

Parameters

$type
string
$method
string
$parameters
array

Returns

mixed
Properties summary
protected array $default array( 'Cache' => 'SimplePie_Cache', 'Locator' => 'SimplePie_Locator', 'Parser' => 'SimplePie_Parser', 'File' => 'SimplePie_File', 'Sanitize' => 'SimplePie_Sanitize', 'Item' => 'SimplePie_Item', 'Author' => 'SimplePie_Author', 'Category' => 'SimplePie_Category', 'Enclosure' => 'SimplePie_Enclosure', 'Caption' => 'SimplePie_Caption', 'Copyright' => 'SimplePie_Copyright', 'Credit' => 'SimplePie_Credit', 'Rating' => 'SimplePie_Rating', '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', )
#

Default class mapping

Overriding classes must subclass these.

protected array $classes array()
#

Class mapping

See

SimplePie_Registry::register()
protected array $legacy array()
#

Legacy classes

See

SimplePie_Registry::register()

Show some love! Wishlists for Geoffrey, Ryan P., and Ryan M.

SimplePie is © 2004–2012 Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors. Licensed under the BSD License. Hosted thanks to Matt Mullenweg, API documentation generated by ApiGen 2.6.1. Variation on the Feed Icon by Wolfgang Bartelme.