ServiceProvider
Corex\Foundation\ServiceProvider · class · Core layer
The single extension seam for Corex modules and add-ons. A provider binds services in register() (no side effects) and wires behavior in boot(), which runs only after every provider has registered — so a provider may depend on another’s bindings during boot.
Public API
Section titled “Public API”__construct(ContainerInterface $container)
Section titled “__construct(ContainerInterface $container)”register(): void
Section titled “register(): void”Bind services into the container. MUST NOT trigger side effects.
boot(): void
Section titled “boot(): void”Run after all providers are registered. Override to wire hooks or read config.
subscribers(): array
Section titled “subscribers(): array”Hook-subscriber classes this provider contributes; wired during the boot pass.
controllerPaths(): array
Section titled “controllerPaths(): array”Controller locations this module exposes for auto-discovery, as PSR-4 namespace prefix => directory. Scanned during the boot pass.