40 $this->
setValue(
'autoloadManager', $autoload_manager);
43 $this->
setFactory(
'amdConfig', array($this,
'getAmdConfig'));
46 $this->
setFactory(
'db', array($this,
'getDatabase'));
47 $this->
setFactory(
'events', array($this,
'getEvents'));
48 $this->
setFactory(
'hooks', array($this,
'getHooks'));
49 $this->
setFactory(
'logger', array($this,
'getLogger'));
50 $this->
setClassName(
'metadataCache',
'ElggVolatileMetadataCache');
51 $this->
setFactory(
'persistentLogin', array($this,
'getPersistentLogin'));
52 $this->
setFactory(
'queryCounter', array($this,
'getQueryCounter'),
false);
53 $this->
setFactory(
'request', array($this,
'getRequest'));
54 $this->
setFactory(
'router', array($this,
'getRouter'));
55 $this->
setFactory(
'session', array($this,
'getSession'));
56 $this->
setFactory(
'views', array($this,
'getViews'));
58 $this->
setFactory(
'notifications', array($this,
'getNotifications'));
112 $svcs[
'hooks']->setLogger($svcs[
'logger']);
114 $svcs[
'events']->setLogger($svcs[
'logger']);
116 foreach ($svcs as
$key => $service) {
119 return $svcs[$service_needed];
154 $params = $CONFIG->cookies[
'session'];
156 if (in_array(
$key, array(
'path',
'domain',
'secure',
'httponly'))) {
212 $remember_me_cookies_config = $cookies_config[
'remember_me'];
213 $cookie_name = $remember_me_cookies_config[
'name'];
214 $cookie_token = $c->request->cookies->get($cookie_name,
'');
getRequest(Elgg_Di_ServiceProvider $c)
Request factory.
elgg_get_config($name, $site_guid=0)
Get an Elgg configuration value.
setFactory($name, $callable, $shared=true)
Set a factory to generate a value when the container is read.
getQueryCounter(Elgg_Di_ServiceProvider $c)
Query counter factory.
resolveLoggerDependencies($service_needed)
Returns the first requested service of the logger, events, and hooks.
setClassName($name, $class_name, $shared=true)
Set a factory based on instantiating a class with no arguments.
getLogger(Elgg_Di_ServiceProvider $c)
Logger factory.
getAmdConfig(Elgg_Di_ServiceProvider $c)
AMD Config factory.
getRouter(Elgg_Di_ServiceProvider $c)
Router factory.
getDatabase(Elgg_Di_ServiceProvider $c)
Database factory.
getSession(Elgg_Di_ServiceProvider $c)
Session factory.
setValue($name, $value)
Set a value to be returned without modification.
elgg global
Pointer to the global context.
_elgg_get_simplecache_root()
Get the base url for simple cache requests.
static createFromGlobals()
Creates a request from PHP's globals.
getNotifications(Elgg_Di_ServiceProvider $c)
Notification service factory.
elgg_get_access_object()
Returns the Elgg_Access object.
__construct(Elgg_AutoloadManager $autoload_manager)
Constructor.
getEvents(Elgg_Di_ServiceProvider $c)
Events service factory.
getHooks(Elgg_Di_ServiceProvider $c)
Plugin hooks service factory.
getPersistentLogin(Elgg_Di_ServiceProvider $c)
Persistent login service factory.
getViews(Elgg_Di_ServiceProvider $c)
Views service factory.