Dependency Injection container for Elgg

1.1.2 2019-05-24 11:02 UTC

This package is auto-updated.

Last update: 2023-03-25 04:43:14 UTC


Elgg 2.3


  • PHP-DI integration for Elgg



  • Place the plugin above all others in your plugin list and enable

Service Registration

  • To register a new service, add config/di.php to your plugin root and return an array of services you want to register
  • You can access services via elgg_di()->$service_name

Container Compilation

  • To disable container compilation/caching - set $CONFIG->environment = 'development'

Plugin Config

  • You can set site-wide config by creating oonfig/config.php in your plugin, and returning an array of key value pairs. Note that plugins with higher priority with override config previously defined in other plugins.