Definition at line 28 of file DiContainer.php.
Elgg\Di\DiContainer::__get |
( |
|
$name | ) |
|
Fetch a value.
- Parameters
-
string | $name | The name of the value to fetch |
- Returns
- mixed
- Exceptions
-
Definition at line 49 of file DiContainer.php.
Elgg\Di\DiContainer::build |
( |
|
$factory, |
|
|
|
$name |
|
) |
| |
|
protected |
Build a value.
- Parameters
-
mixed | $factory | The factory for the value |
string | $name | The name of the value |
- Returns
- mixed
- Exceptions
-
Definition at line 74 of file DiContainer.php.
Elgg\Di\DiContainer::has |
( |
|
$name | ) |
|
Does the container have this value.
- Parameters
-
string | $name | The name of the value |
- Returns
- bool
Definition at line 164 of file DiContainer.php.
Elgg\Di\DiContainer::remove |
( |
|
$name | ) |
|
Remove a value from the container.
- Parameters
-
string | $name | The name of the value |
- Returns
Definition at line 152 of file DiContainer.php.
Elgg\Di\DiContainer::setClassName |
( |
|
$name, |
|
|
|
$class_name, |
|
|
|
$shared = true |
|
) |
| |
Set a factory based on instantiating a class with no arguments.
- Parameters
-
string | $name | Name of the value |
string | $class_name | Class name to be instantiated |
bool | $shared | Whether the same value should be returned for every request |
- Returns
- Exceptions
-
Definition at line 135 of file DiContainer.php.
Elgg\Di\DiContainer::setFactory |
( |
|
$name, |
|
|
|
$callable, |
|
|
|
$shared = true |
|
) |
| |
Set a factory to generate a value when the container is read.
- Parameters
-
string | $name | The name of the value |
callable | $callable | Factory for the value |
bool | $shared | Whether the same value should be returned for every request |
- Returns
- Exceptions
-
Definition at line 114 of file DiContainer.php.
Elgg\Di\DiContainer::setValue |
( |
|
$name, |
|
|
|
$value |
|
) |
| |
Set a value to be returned without modification.
- Parameters
-
string | $name | The name of the value |
mixed | $value | The value |
- Returns
- Exceptions
-
Definition at line 99 of file DiContainer.php.
Elgg\Di\DiContainer::$cache = array() |
|
protected |
Elgg\Di\DiContainer::$factories = array() |
|
protected |
const Elgg\Di\DiContainer::CLASS_NAME_PATTERN_53 = '/^(\\\\?[a-z_\x7f-\xff][a-z0-9_\x7f-\xff]*)+$/i' |
The documentation for this class was generated from the following file: