6 'autoloadManager' => DI\autowire(\
Elgg\AutoloadManager::class)->constructorParameter(
'cache', DI\
get(
'localFileCache')),
7 'accessCache' => DI\factory(
function (ContainerInterface $c) {
8 return $c->sessionCache->access;
10 'accessCollections' => DI\autowire(\
Elgg\Database\AccessCollections::class)->constructorParameter(
'cache', DI\
get(
'accessCache')),
11 'actions' => DI\autowire(\
Elgg\ActionsService::class),
12 'accounts' => DI\autowire(\
Elgg\Users\Accounts::class),
13 'adminNotices' => DI\autowire(\
Elgg\Database\AdminNotices::class),
14 'ajax' => DI\autowire(\
Elgg\Ajax\Service::class),
15 'annotationsTable' => DI\autowire(\
Elgg\Database\AnnotationsTable::class),
16 'apiUsersTable' => DI\autowire(\
Elgg\Database\ApiUsersTable::class),
17 'authentication' => DI\autowire(\
Elgg\AuthenticationService::class),
18 'autoParagraph' => DI\autowire(\
Elgg\Views\AutoParagraph::class),
19 'boot' => DI\autowire(\
Elgg\BootService::class)->constructorParameter(
'cache', DI\
get(
'bootCache')),
20 'bootCache' => DI\factory(
function (ContainerInterface $c) {
22 return new \Elgg\Cache\CompositeCache(
'elgg_boot', $c->config, $flags);
24 'cacheHandler' => DI\autowire(\
Elgg\Application\CacheHandler::class),
25 'cssCompiler' => DI\autowire(\
Elgg\Assets\CssCompiler::class),
26 'csrf' => DI\autowire(\
Elgg\Security\Csrf::class),
27 'classLoader' => DI\autowire(\
Elgg\ClassLoader::class),
28 'cli' => DI\autowire(\
Elgg\Cli::class)->constructorParameter(
'input', DI\
get(
'cli_input'))->constructorParameter(
'output', DI\
get(
'cli_output')),
29 'cli_input' => DI\factory(
function (ContainerInterface $c) {
30 return \Elgg\Application::getStdIn();
32 'cli_output' => DI\factory(
function (ContainerInterface $c) {
33 return \Elgg\Application::getStdOut();
35 'cli_progress' => DI\autowire(\
Elgg\Cli\Progress::class)->constructorParameter(
'output', DI\
get(
'cli_output')),
37 'configTable' => DI\autowire(\
Elgg\Database\ConfigTable::class),
38 'cron' => DI\autowire(\
Elgg\Cron::class),
39 'crypto' => DI\autowire(\
Elgg\Security\Crypto::class),
40 'dataCache' => DI\autowire(\
Elgg\Cache\DataCache::class),
41 'db' => DI\autowire(\
Elgg\Database::class),
43 'delayedEmailQueueTable' => DI\autowire(\
Elgg\Database\DelayedEmailQueueTable::class),
44 'delayedEmailService' => DI\autowire(\
Elgg\Email\DelayedEmailService::class),
45 'emails' => DI\autowire(\
Elgg\EmailService::class)->constructorParameter(
'mailer', DI\
get(
'mailer')),
46 'entityCache' => DI\factory(
function (ContainerInterface $c) {
47 return new \Elgg\Cache\EntityCache($c->sessionCache->entities);
49 'entity_capabilities' => DI\autowire(\
Elgg\EntityCapabilitiesService::class),
50 'entityPreloader' => DI\autowire(\
Elgg\EntityPreloader::class),
51 'entityTable' => DI\autowire(\
Elgg\Database\EntityTable::class),
52 'esm' => DI\autowire(\
Elgg\Javascript\ESMService::class),
53 'events' => DI\autowire(\
Elgg\EventsService::class),
54 'externalFiles' => DI\autowire(\
Elgg\Assets\ExternalFiles::class)->constructorParameter(
'serverCache', DI\
get(
'serverCache')),
55 'fields' => DI\autowire(\
Elgg\Forms\FieldsService::class),
56 'forms' => DI\autowire(\
Elgg\FormsService::class),
57 'fileCache' => DI\factory(
function (ContainerInterface $c) {
59 return new \Elgg\Cache\CompositeCache(
'elgg_system_cache', $c->config, $flags);
61 'filestore' => DI\factory(
function (ContainerInterface $c) {
62 return new \Elgg\Filesystem\Filestore\DiskFilestore($c->config->dataroot);
64 'gatekeeper' => DI\autowire(\
Elgg\Gatekeeper::class),
65 'group_tools' => DI\autowire(\
Elgg\Groups\Tools::class),
66 'handlers' => DI\autowire(\
Elgg\HandlersService::class),
67 'hmac' => DI\autowire(\
Elgg\Security\HmacFactory::class),
68 'hmacCacheTable' => DI\autowire(\
Elgg\Database\HMACCacheTable::class),
69 'html_formatter' => DI\autowire(\
Elgg\Views\HtmlFormatter::class),
70 'iconService' => DI\autowire(\
Elgg\EntityIconService::class),
71 'imageFetcher' => DI\autowire(\
Elgg\Assets\ImageFetcherService::class),
72 'imageService' => DI\autowire(\
Elgg\ImageService::class),
73 'invoker' => DI\autowire(\
Elgg\Invoker::class)->constructorParameter(
'dic',
function() {
return elgg(); }),
74 'locale' => DI\autowire(\
Elgg\I18n\LocaleService::class),
75 'localFileCache' => DI\factory(
function (ContainerInterface $c) {
77 return new \Elgg\Cache\CompositeCache(
'elgg_local_system_cache', $c->config, $flags);
79 'logger' => DI\factory(
function (ContainerInterface $c) {
82 $logger->setLevel($c->config->debug);
86 'mailer' => DI\factory(
function (ContainerInterface $c) {
87 switch ($c->config->emailer_transport) {
89 $transport = new \Laminas\Mail\Transport\Smtp();
90 $transportOptions = new \Laminas\Mail\Transport\SmtpOptions(
91 $c->config->emailer_smtp_settings
93 $transport->setOptions($transportOptions);
96 return new \Laminas\Mail\Transport\Sendmail($c->config->emailer_sendmail_settings);
99 'menus' => DI\autowire(\
Elgg\Menu\Service::class),
100 'metadataCache' => DI\factory(
function (ContainerInterface $c) {
101 $cache = $c->dataCache->metadata;
102 return new \Elgg\Cache\MetadataCache($cache);
104 'metadataTable' => DI\autowire(\
Elgg\Database\MetadataTable::class),
105 'mimetype' => DI\autowire(\
Elgg\Filesystem\MimeTypeService::class),
106 'mutex' => DI\autowire(\
Elgg\Database\Mutex::class),
107 'notifications' => DI\autowire(\
Elgg\Notifications\NotificationsService::class)->constructorParameter(
'queue', DI\
get(
'notificationsQueue')),
108 'notificationsQueue' => DI\autowire(\
Elgg\Notifications\NotificationsQueue::class)->constructorParameter(
'name', \
Elgg\Notifications\NotificationsQueue::QUEUE_NAME),
109 'pageOwner' => DI\autowire(\
Elgg\Page\PageOwnerService::class),
110 'passwords' => DI\autowire(\
Elgg\PasswordService::class),
111 'passwordGenerator' => DI\autowire(\
Elgg\Security\PasswordGeneratorService::class),
112 'persistentLogin' => DI\autowire(\
Elgg\PersistentLoginService::class),
113 'plugins' => DI\autowire(\
Elgg\Database\Plugins::class)->constructorParameter(
'cache', DI\
get(
'pluginsCache')),
114 'pluginsCache' => DI\factory(
function (ContainerInterface $c) {
117 'publicDb' => DI\autowire(\
Elgg\Application\Database::class),
118 'queryCache' => DI\factory(
function (ContainerInterface $c) {
119 $config_disabled = $c->config->db_disable_query_cache ===
true;
120 return new \Elgg\Cache\QueryCache($c->config->db_query_cache_limit, $config_disabled);
122 'redirects' => DI\autowire(\
Elgg\RedirectService::class),
123 'relationshipsTable' => DI\autowire(\
Elgg\Database\RelationshipsTable::class),
124 'request' => DI\factory(
function (ContainerInterface $c) {
126 $request = \Elgg\Http\Request::createFromGlobals();
130 if ($CONFIG instanceof \
Elgg\Config) {
131 $request->initializeTrustedProxyConfiguration($CONFIG);
137 'requestContext' => DI\factory(
function (ContainerInterface $c) {
138 $context = new \Elgg\Router\RequestContext();
139 return $context->fromRequest($c->request);
141 'responseFactory' => DI\autowire(\
Elgg\Http\ResponseFactory::class),
142 'riverTable' => DI\autowire(\
Elgg\Database\RiverTable::class),
143 'routeCollection' => DI\autowire(\
Elgg\Router\RouteCollection::class),
144 'routes' => DI\autowire(\
Elgg\Router\RouteRegistrationService::class),
145 'router' => DI\autowire(\
Elgg\Router::class),
146 'search' => DI\autowire(\
Elgg\Search\SearchService::class),
147 'seeder' => DI\autowire(\
Elgg\Database\Seeder::class),
148 'serveFileHandler' => DI\autowire(\
Elgg\Application\ServeFileHandler::class),
149 'session' => DI\factory(
function (ContainerInterface $c) {
150 return \ElggSession::fromDatabase($c->config, $c->db);
152 'sessionCache' => DI\autowire(\
Elgg\Cache\SessionCache::class),
153 'session_manager' => DI\autowire(\
Elgg\SessionManagerService::class),
154 'simpleCache' => DI\autowire(\
Elgg\Cache\SimpleCache::class),
155 'siteSecret' => DI\autowire(\
Elgg\Security\SiteSecret::class),
156 'stickyForms' => DI\autowire(\
Elgg\Forms\StickyForms::class),
157 'systemCache' => DI\autowire(\
Elgg\Cache\SystemCache::class)->constructorParameter(
'cache', DI\
get(
'fileCache')),
158 'serverCache' => DI\autowire(\
Elgg\Cache\SystemCache::class)->constructorParameter(
'cache', DI\
get(
'localFileCache')),
159 'subscriptions' => DI\autowire(\
Elgg\Notifications\SubscriptionsService::class),
160 'system_messages' => DI\autowire(\
Elgg\SystemMessagesService::class),
161 'table_columns' => DI\autowire(\
Elgg\Views\TableColumn\ColumnFactory::class),
162 'temp_filestore' => DI\autowire(\
Elgg\Filesystem\Filestore\TempDiskFilestore::class),
163 'timer' => DI\autowire(\
Elgg\Timer::class),
164 'translator' => DI\autowire(\
Elgg\I18n\Translator::class),
165 'uploads' => DI\autowire(\
Elgg\UploadService::class),
166 'upgrades' => DI\autowire(\
Elgg\UpgradeService::class),
167 'urlGenerator' => DI\autowire(\
Elgg\Router\UrlGenerator::class),
168 'urlMatcher' => DI\autowire(\
Elgg\Router\UrlMatcher::class),
169 'urlSigner' => DI\autowire(\
Elgg\Security\UrlSigner::class),
170 'urls' => DI\autowire(\
Elgg\Http\Urls::class),
171 'userCapabilities' => DI\autowire(\
Elgg\UserCapabilities::class),
172 'usersApiSessionsTable' => DI\autowire(\
Elgg\Database\UsersApiSessionsTable::class),
173 'users_remember_me_cookies_table' => DI\autowire(\
Elgg\Database\UsersRememberMeCookiesTable::class),
174 'upgradeLocator' => DI\autowire(\
Elgg\Upgrade\Locator::class),
175 'views' => DI\autowire(\
Elgg\ViewsService::class)->constructorParameter(
'server_cache', DI\
get(
'serverCache')),
176 'viewCacher' => DI\autowire(\
Elgg\Cache\ViewCacher::class),
177 'widgets' => DI\autowire(\
Elgg\WidgetsService::class),
180 \ElggSession::class => DI\get(
'session'),
181 \Elgg\ActionsService::class => DI\get(
'actions'),
182 \Elgg\Ajax\Service::class => DI\get(
'ajax'),
183 \Elgg\Application\CacheHandler::class => DI\get(
'cacheHandler'),
184 \Elgg\Application\Database::class => DI\get(
'publicDb'),
185 \Elgg\Application\ServeFileHandler::class => DI\get(
'serveFileHandler'),
186 \Elgg\Assets\CssCompiler::class => DI\get(
'cssCompiler'),
187 \Elgg\Assets\ExternalFiles::class => DI\get(
'externalFiles'),
188 \Elgg\Assets\ImageFetcherService::class => DI\get(
'imageFetcher'),
189 \Elgg\AuthenticationService::class => DI\get(
'authentication'),
190 \Elgg\AutoloadManager::class => DI\get(
'autoloadManager'),
191 \Elgg\BootService::class => DI\get(
'boot'),
192 \Elgg\Cache\DataCache::class => DI\get(
'dataCache'),
193 \Elgg\Cache\EntityCache::class => DI\get(
'entityCache'),
194 \Elgg\Cache\MetadataCache::class => DI\get(
'metadataCache'),
195 \Elgg\Cache\QueryCache::class => DI\get(
'queryCache'),
196 \Elgg\Cache\SessionCache::class => DI\get(
'sessionCache'),
197 \Elgg\Cache\SimpleCache::class => DI\get(
'simpleCache'),
198 \Elgg\Cache\SystemCache::class => DI\get(
'systemCache'),
199 \Elgg\Cache\ViewCacher::class => DI\get(
'viewCacher'),
200 \Elgg\ClassLoader::class => DI\get(
'classLoader'),
201 \Elgg\Cli::class => DI\get(
'cli'),
202 \Elgg\Cli\Progress::class => DI\get(
'cli_progress'),
203 \Elgg\Config::class => DI\get(
'config'),
204 \Elgg\Cron::class => DI\get(
'cron'),
205 \Elgg\Database::class => DI\get(
'db'),
206 \Elgg\Database\AccessCollections::class => DI\get(
'accessCollections'),
207 \Elgg\Database\AdminNotices::class => DI\get(
'adminNotices'),
208 \Elgg\Database\AnnotationsTable::class => DI\get(
'annotationsTable'),
209 \Elgg\Database\ApiUsersTable::class => DI\get(
'apiUsersTable'),
210 \Elgg\Database\ConfigTable::class => DI\get(
'configTable'),
211 \Elgg\Database\DbConfig::class => DI\get(
'dbConfig'),
212 \Elgg\Database\DelayedEmailQueueTable::class => DI\get(
'delayedEmailQueueTable'),
213 \Elgg\Database\EntityTable::class => DI\get(
'entityTable'),
214 \Elgg\Database\HMACCacheTable::class => DI\get(
'hmacCacheTable'),
215 \Elgg\Database\MetadataTable::class => DI\get(
'metadataTable'),
216 \Elgg\Database\Mutex::class => DI\get(
'mutex'),
217 \Elgg\Database\Plugins::class => DI\get(
'plugins'),
218 \Elgg\Database\RelationshipsTable::class => DI\get(
'relationshipsTable'),
219 \Elgg\Database\RiverTable::class => DI\get(
'riverTable'),
220 \Elgg\Database\Seeder::class => DI\get(
'seeder'),
221 \Elgg\Database\UsersApiSessionsTable::class => DI\get(
'usersApiSessionsTable'),
222 \Elgg\Database\UsersRememberMeCookiesTable::class => DI\get(
'users_remember_me_cookies_table'),
223 \Elgg\EntityPreloader::class => DI\get(
'entityPreloader'),
224 \Elgg\EmailService::class => DI\get(
'emails'),
225 \Elgg\Email\DelayedEmailService::class => DI\get(
'delayedEmailService'),
226 \Elgg\EntityIconService::class => DI\get(
'iconService'),
227 \Elgg\EventsService::class => DI\get(
'events'),
228 \Elgg\Filesystem\Filestore\DiskFilestore::class => DI\get(
'filestore'),
229 \Elgg\Filesystem\Filestore\TempDiskFilestore::class => DI\get(
'temp_filestore'),
230 \Elgg\Filesystem\MimeTypeService::class => DI\get(
'mimetype'),
231 \Elgg\FormsService::class => DI\get(
'forms'),
232 \Elgg\Forms\FieldsService::class => DI\get(
'fields'),
233 \Elgg\Forms\StickyForms::class => DI\get(
'stickyForms'),
234 \Elgg\Gatekeeper::class => DI\get(
'gatekeeper'),
235 \Elgg\Groups\Tools::class => DI\get(
'group_tools'),
236 \Elgg\HandlersService::class => DI\get(
'handlers'),
237 \Elgg\Http\Request::class => DI\get(
'request'),
238 \Elgg\Http\ResponseFactory::class => DI\get(
'responseFactory'),
239 \Elgg\Http\Urls::class => DI\get(
'urls'),
240 \Elgg\I18n\LocaleService::class => DI\get(
'locale'),
241 \Elgg\I18n\Translator::class => DI\get(
'translator'),
242 \Elgg\ImageService::class => DI\get(
'imageService'),
243 \Elgg\Javascript\ESMService::class => DI\get(
'esm'),
244 \Elgg\Invoker::class => DI\get(
'invoker'),
245 \Elgg\Logger::class => DI\get(
'logger'),
246 \Elgg\Menu\Service::class => DI\get(
'menus'),
247 \Elgg\Notifications\NotificationsService::class => DI\get(
'notifications'),
248 \Elgg\Notifications\NotificationsQueue::class => DI\get(
'notificationsQueue'),
249 \Elgg\Notifications\SubscriptionsService::class => DI\get(
'subscriptions'),
250 \Elgg\Page\PageOwnerService::class => DI\get(
'pageOwner'),
251 \Elgg\PasswordService::class => DI\get(
'passwords'),
252 \Elgg\PersistentLoginService::class => DI\get(
'persistentLogin'),
253 \Elgg\RedirectService::class => DI\get(
'redirects'),
254 \Elgg\Router::class => DI\get(
'router'),
255 \Elgg\Router\RequestContext::class => DI\get(
'requestContext'),
256 \Elgg\Router\RouteCollection::class => DI\get(
'routeCollection'),
257 \Elgg\Router\RouteRegistrationService::class => DI\get(
'routes'),
258 \Elgg\Router\UrlGenerator::class => DI\get(
'urlGenerator'),
259 \Elgg\Router\UrlMatcher::class => DI\get(
'urlMatcher'),
260 \Elgg\Search\SearchService::class => DI\get(
'search'),
261 \Elgg\Security\Crypto::class => DI\get(
'crypto'),
262 \Elgg\Security\Csrf::class => DI\get(
'csrf'),
263 \Elgg\Security\HmacFactory::class => DI\get(
'hmac'),
264 \Elgg\Security\PasswordGeneratorService::class => DI\get(
'passwordGenerator'),
265 \Elgg\Security\SiteSecret::class => DI\get(
'siteSecret'),
266 \Elgg\Security\UrlSigner::class => DI\get(
'urlSigner'),
267 \Elgg\SessionManagerService::class => DI\get(
'session_manager'),
268 \Elgg\SystemMessagesService::class => DI\get(
'system_messages'),
269 \Elgg\Timer::class => DI\get(
'timer'),
270 \Elgg\UpgradeService::class => DI\get(
'upgrades'),
271 \Elgg\Upgrade\Locator::class => DI\get(
'upgradeLocator'),
272 \Elgg\UploadService::class => DI\get(
'uploads'),
273 \Elgg\UserCapabilities::class => DI\get(
'userCapabilities'),
274 \Elgg\Users\Accounts::class => DI\get(
'accounts'),
275 \Elgg\ViewsService::class => DI\get(
'views'),
276 \Elgg\Views\AutoParagraph::class => DI\get(
'autoParagraph'),
277 \Elgg\Views\HtmlFormatter::class => DI\get(
'html_formatter'),
278 \Elgg\Views\TableColumn\ColumnFactory::class => DI\get(
'table_columns'),
279 \Elgg\WidgetsService::class => DI\get(
'widgets'),
static factory(InputInterface $input=null, OutputInterface $output=null)
Build a new logger.
const ELGG_CACHE_LOCALFILESYSTEM
const ELGG_CACHE_PERSISTENT
const ELGG_CACHE_FILESYSTEM