|  | 
|  | __get ($name) | 
|  | Fetch a value.  More... 
 | 
|  | 
|  | setValue ($name, $value) | 
|  | Set a value to be returned without modification.  More... 
 | 
|  | 
|  | setFactory ($name, $callable, $shared=true) | 
|  | Set a factory to generate a value when the container is read.  More... 
 | 
|  | 
|  | setClassName ($name, $class_name, $shared=true) | 
|  | Set a factory based on instantiating a class with no arguments.  More... 
 | 
|  | 
|  | remove ($name) | 
|  | Remove a value from the container.  More... 
 | 
|  | 
|  | has ($name) | 
|  | Does the container have this value.  More... 
 | 
|  | 
Definition at line 27 of file DiContainer.php.
 
◆ __get()
      
        
          | 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.
 
 
◆ build()
  
  | 
        
          | 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.
 
 
◆ has()
      
        
          | Elgg_Di_DiContainer::has | ( |  | $name | ) |  | 
      
 
Does the container have this value. 
- Parameters
- 
  
    | string | $name | The name of the value |  
 
- Returns
- bool 
Definition at line 162 of file DiContainer.php.
 
 
◆ remove()
      
        
          | Elgg_Di_DiContainer::remove | ( |  | $name | ) |  | 
      
 
 
◆ setClassName()
      
        
          | 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
- Elgg_Di_DiContainer 
- Exceptions
- 
  
  
Definition at line 135 of file DiContainer.php.
 
 
◆ setFactory()
      
        
          | 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
- Elgg_Di_DiContainer 
- Exceptions
- 
  
  
Definition at line 114 of file DiContainer.php.
 
 
◆ setValue()
      
        
          | 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
- Elgg_Di_DiContainer 
- Exceptions
- 
  
  
Definition at line 99 of file DiContainer.php.
 
 
◆ $cache
  
  | 
        
          | Elgg_Di_DiContainer::$cache = array() |  | protected | 
 
 
◆ $factories
  
  | 
        
          | Elgg_Di_DiContainer::$factories = array() |  | protected | 
 
 
◆ CLASS_NAME_PATTERN_52
      
        
          | const Elgg_Di_DiContainer::CLASS_NAME_PATTERN_52 = '/^[a-z_\x7f-\xff][a-z0-9_\x7f-\xff]*$/i' | 
      
 
 
◆ CLASS_NAME_PATTERN_53
      
        
          | 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: