Select your language

Sign up

The Joomla dependency injection container stores service definitions and supplies services to code on request. It helps assemble objects with their required dependencies.

Dependency injection in use

Rather than constructing every helper internally, a class receives the services it needs. Service providers register object creation rules in the Joomla container. This makes dependencies more explicit and supports substitution during tests.

Extension containers

A Joomla extension can use a child container with its own service definitions. Registration scope, service identifiers and loading time affect availability. The container does not automatically validate every installation-package dependency.

Use the Joomla container to construct services rather than as arbitrary user-data storage. Check object dependencies and lifecycle behaviour.

Newsletter Subscription
Enter your email address and we will keep you updated!

Joomla.center is not affiliated with or endorsed by the Joomla!® Project or Open Source Matters. The Joomla!® name and logo is used under a limited license granted by Open Source Matters, the trademark holder in the United States and other countries.