Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.2.x will end 22 April 2024 (12 months).
  • Bug fixes for security issues in 4.2.x will end 7 October 2024 (18 months).
  • PHP version: minimum PHP 8.0.0 Note: minimum PHP version has increased since Moodle 4.1. PHP 8.1.x is supported too.

SimplePie A PHP-Based RSS and Atom Feed Framework. Takes the hard work out of managing a complete RSS/Atom solution.

Author: Ryan Parman
Author: Sam Sneddon
Author: Ryan McCue
Copyright: 2004-2016 Ryan Parman, Sam Sneddon, Ryan McCue
License: http://www.opensource.org/licenses/bsd-license.php BSD License
File Size: 272 lines (9 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Registry:: (5 methods):
  __construct()
  register()
  get_class()
  create()
  call()


Class: Registry  - X-Ref

Handles creating objects and calling methods

Access this via {@see \SimplePie\SimplePie::get_registry()}

__construct()   X-Ref
Constructor

No-op

register($type, $class, $legacy = false)   X-Ref
Register a class

param: string $type See {@see $default} for names
param: class-string $class Class name, must subclass the corresponding default
param: bool $legacy Whether to enable legacy support for this class
return: bool Successfulness

get_class($type)   X-Ref
Get the class registered for a type

Where possible, use {@see create()} or {@see call()} instead

param: class-string<T> $type
return: class-string<T>|null

create($type, $parameters = [])   X-Ref
Create a new instance of a given type

param: class-string<T> $type
param: array $parameters Parameters to pass to the constructor
return: T Instance of class

call($type, $method, $parameters = [])   X-Ref
Call a static method for a type

param: class-string $type
param: string $method
param: array $parameters
return: mixed