X-Cart v5.5 is built on Symfony v5.4 and uses a unique add-on system with multiple inheritance via code generation.
The application start and the basic services configuration (database access, caching, template, sessions and queue processing, etc. ) is done by the means of Symfony. After that all processes are run by X-Cart and it provides the final result to the end-user.
Since X-Cart core is not a Symfiny service, it is not possible to use Symfony DI efficiently. The Container access is accomplished via the Service Locator (\XCart\Container::getContainer, or \XCart\Container::getServiceLocator for some services). In some cases it is necessary to define services as public services.
Add-ons can contain X-Cart scarffolding code and act as bundles, that allows to create new services and adjust functioning via the Symfony means.
The core code is divided into 3 parts - scarffolding code (classes), Symfony-compatible code (scr), legacy service code (Includes).
The add-on code is a pure scarffolding code, that can efficiently be used as Symfony code (services, decorator, etc.). The add-ons code can also include 3rd party libraries that are not used for scarffolding and are not a part of the Symfony core.