Luminova Framework

PHP Luminova: Application Service Registration

Last updated: 2026-11-28 20:57:12

Register service objects with their dependencies and sharing preferences.

Use the custom service registry when application code needs to retrieve an object by name. Register each service before its first use. The registry derives the name from the class basename and rejects duplicate names.

Register Services

Use Luminova\Foundation\Module\Service::add() with a constructed object or a class name. An object allows you to pass constructor dependencies explicitly before registering it.

use App\Utils\YourServiceClassName;
use Luminova\Foundation\Module\Service;

Service::add(new YourServiceClassName('foo', 'bar'));

See the Service API reference for the constructor argument, sharing, and serialization options.


On this page