Elgg  Version 1.9
Public Member Functions | Protected Member Functions | List of all members
Elgg_Di_ServiceProvider Class Reference
Inheritance diagram for Elgg_Di_ServiceProvider:
Elgg_Di_DiContainer

Public Member Functions

 __construct (Elgg_AutoloadManager $autoload_manager)
 Constructor. More...
 
- Public Member Functions inherited from Elgg_Di_DiContainer
 __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...
 

Protected Member Functions

 getDatabase (Elgg_Di_ServiceProvider $c)
 Database factory. More...
 
 getEvents (Elgg_Di_ServiceProvider $c)
 Events service factory. More...
 
 getLogger (Elgg_Di_ServiceProvider $c)
 Logger factory. More...
 
 getHooks (Elgg_Di_ServiceProvider $c)
 Plugin hooks service factory. More...
 
 resolveLoggerDependencies ($service_needed)
 Returns the first requested service of the logger, events, and hooks. More...
 
 getViews (Elgg_Di_ServiceProvider $c)
 Views service factory. More...
 
 getAmdConfig (Elgg_Di_ServiceProvider $c)
 AMD Config factory. More...
 
 getSession (Elgg_Di_ServiceProvider $c)
 Session factory. More...
 
 getRequest (Elgg_Di_ServiceProvider $c)
 Request factory. More...
 
 getRouter (Elgg_Di_ServiceProvider $c)
 Router factory. More...
 
 getNotifications (Elgg_Di_ServiceProvider $c)
 Notification service factory. More...
 
 getPersistentLogin (Elgg_Di_ServiceProvider $c)
 Persistent login service factory. More...
 
 getQueryCounter (Elgg_Di_ServiceProvider $c)
 Query counter factory. More...
 
- Protected Member Functions inherited from Elgg_Di_DiContainer
 build ($factory, $name)
 Build a value. More...
 

Additional Inherited Members

- Public Attributes inherited from Elgg_Di_DiContainer
const CLASS_NAME_PATTERN_52 = '/^[a-z_\x7f-\xff][a-z0-9_\x7f-\xff]*$/i'
 
const CLASS_NAME_PATTERN_53 = '/^(\\\\?[a-z_\x7f-\xff][a-z0-9_\x7f-\xff]*)+$/i'
 
- Protected Attributes inherited from Elgg_Di_DiContainer
 $factories = array()
 
 $cache = array()
 

Detailed Description

Definition at line 32 of file ServiceProvider.php.

Constructor & Destructor Documentation

Elgg_Di_ServiceProvider::__construct ( Elgg_AutoloadManager  $autoload_manager)

Constructor.

Parameters
Elgg_AutoloadManager$autoload_managerClass autoloader

Definition at line 39 of file ServiceProvider.php.

Member Function Documentation

Elgg_Di_ServiceProvider::getAmdConfig ( Elgg_Di_ServiceProvider  $c)
protected

AMD Config factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Amd_Config

Definition at line 138 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getDatabase ( Elgg_Di_ServiceProvider  $c)
protected

Database factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Database

Definition at line 67 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getEvents ( Elgg_Di_ServiceProvider  $c)
protected

Events service factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_EventsService

Definition at line 78 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getHooks ( Elgg_Di_ServiceProvider  $c)
protected

Plugin hooks service factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_PluginHooksService

Definition at line 98 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getLogger ( Elgg_Di_ServiceProvider  $c)
protected

Logger factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Logger

Definition at line 88 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getNotifications ( Elgg_Di_ServiceProvider  $c)
protected

Notification service factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Notifications_NotificationsService

Definition at line 196 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getPersistentLogin ( Elgg_Di_ServiceProvider  $c)
protected

Persistent login service factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_PersistentLoginService

Definition at line 210 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getQueryCounter ( Elgg_Di_ServiceProvider  $c)
protected

Query counter factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Database_QueryCounter

Definition at line 224 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getRequest ( Elgg_Di_ServiceProvider  $c)
protected

Request factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Http_Request

Definition at line 175 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getRouter ( Elgg_Di_ServiceProvider  $c)
protected

Router factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_Router

Definition at line 185 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getSession ( Elgg_Di_ServiceProvider  $c)
protected

Session factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
ElggSession

Definition at line 150 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::getViews ( Elgg_Di_ServiceProvider  $c)
protected

Views service factory.

Parameters
Elgg_Di_ServiceProvider$cDependency injection container
Returns
Elgg_ViewsService

Definition at line 128 of file ServiceProvider.php.

Elgg_Di_ServiceProvider::resolveLoggerDependencies (   $service_needed)
protected

Returns the first requested service of the logger, events, and hooks.

It sets the hooks and events up in the right order to prevent circular dependency.

Parameters
string$service_neededThe service requested first
Returns
mixed

Definition at line 109 of file ServiceProvider.php.


The documentation for this class was generated from the following file: