Handles creating objects and calling methods.
More...
|
| array< string, $legacyTypes=[ 'Cache'=> | __construct () |
| | Constructor.
|
| |
| & | call ($type, $method, $parameters=[]) |
| | Call a static method for a type.
|
| |
| & | create ($type, $parameters=[]) |
| | Create a new instance of a given type.
|
| |
| | get_class ($type) |
| | Get the class registered for a type.
|
| |
| | register ($type, $class, $legacy=false) |
| | Register a class.
|
| |
|
| array | $classes = [] |
| | Class mapping.
|
| |
| array< class-string > | $legacy = [] |
| | Legacy classes.
|
| |
Handles creating objects and calling methods.
Access this via {
- See also
- SimplePie::SimplePie::get_registry()}
◆ __construct()
| array< string, $legacyTypes=['Cache'=> Registry::__construct |
( |
| ) |
|
◆ call()
| & Registry::call |
( |
| $type, |
|
|
| $method, |
|
|
| $parameters = [] ) |
Call a static method for a type.
- Parameters
-
| class-string | $type | |
| string | $method | |
| array | $parameters | |
- Return values
-
◆ create()
| & Registry::create |
( |
| $type, |
|
|
| $parameters = [] ) |
Create a new instance of a given type.
@template T class-string $type
- Parameters
-
| class-string<T> | $type |
| array | $parameters | Parameters to pass to the constructor |
- Return values
-
◆ get_class()
| Registry::get_class |
( |
| $type | ) |
|
Get the class registered for a type.
Where possible, use {
- See also
- create()} or {
-
call()} instead
@template T
- Parameters
-
- Return values
-
◆ register()
| Registry::register |
( |
| $type, |
|
|
| $class, |
|
|
| $legacy = false ) |
Register a class.
- Parameters
-
- See also
- $default} for names
- Parameters
-
| class-string | $class | Class name, must subclass the corresponding default |
| bool | $legacy | Whether to enable legacy support for this class |
- Return values
-
◆ $classes
| array Registry::$classes = [] |
|
protected |
◆ $legacy
| array<class-string> Registry::$legacy = [] |
|
protected |
The documentation for this class was generated from the following file:
- lib/simplepie/src/Registry.php