Elgg  Version master
public_services.php
Go to the documentation of this file.
1 <?php
2 
3 return [
4  'accounts' => function() {return _elgg_services()->accounts; },
5  'config' => function() {return _elgg_services()->config; },
6  'csrf' => function() {return _elgg_services()->csrf; },
7  'db' => function() {return _elgg_services()->publicDb; },
8  'events' => function() {return _elgg_services()->events; },
9  'fields' => function() {return _elgg_services()->fields; },
10  'gatekeeper' => function() {return _elgg_services()->gatekeeper; },
11  'group_tools' => function() {return _elgg_services()->group_tools; },
12  'html_formatter' => function() {return _elgg_services()->html_formatter; },
13  'locale' => function() {return _elgg_services()->locale; },
14  'logger' => function() {return _elgg_services()->logger; },
15  'menus' => function() {return _elgg_services()->menus; },
16  'mimetype' => function() {return _elgg_services()->mimetype; },
17  'session' => function() {return _elgg_services()->session; },
18  'session_manager' => function() {return _elgg_services()->session_manager; },
19  'system_messages' => function() {return _elgg_services()->system_messages; },
20  'table_columns' => function() {return _elgg_services()->table_columns; },
21  'thread_preloader' => \DI\autowire(\Elgg\Comments\ThreadPreloaderService::class),
22  'translator' => function() {return _elgg_services()->translator; },
23 
24  // map classes to alias to allow autowiring
25  \Elgg\Users\Accounts::class => DI\get('accounts'),
26  \Elgg\Comments\ThreadPreloaderService::class => DI\get('thread_preloader'),
27  \Elgg\Config::class => DI\get('config'),
28  \Elgg\Security\Csrf::class => DI\get('csrf'),
29  \Elgg\Application\Database::class => DI\get('db'),
30  \Elgg\EventsService::class => DI\get('events'),
31  \Elgg\Forms\FieldsService::class => DI\get('fields'),
32  \Elgg\Gatekeeper::class => DI\get('gatekeeper'),
33  \Elgg\Groups\Tools::class => DI\get('group_tools'),
34  \Elgg\Views\HtmlFormatter::class => DI\get('html_formatter'),
35  \Elgg\I18n\LocaleService::class => DI\get('locale'),
36  \Elgg\Logger::class => DI\get('logger'),
37  \Elgg\Menu\Service::class => DI\get('menus'),
38  \Elgg\Filesystem\MimeTypeService::class => DI\get('mimetype'),
39  \ElggSession::class => DI\get('session'),
40  \Elgg\SessionManagerService::class => DI\get('session_manager'),
41  \Elgg\SystemMessagesService::class => DI\get('system_messages'),
42  \Elgg\Views\TableColumn\ColumnFactory::class => DI\get('table_columns'),
43  \Elgg\I18n\Translator::class => DI\get('translator'),
44 ];
_elgg_services()
Get the global service provider.
Definition: elgglib.php:351