Skip to main content

bitrix-service-locator

Stars12
Forks2
UpdatedJuly 16, 2026 at 09:32

Covers DI container Bitrix\Main\DI\ServiceLocator (PSR-11) โ€” registration of services in the services section of a module's .settings.php file, autowire, retrieving dependencies via has()/get(), constructor injection in application services, action-parameter injection in controllers, binding interfaces to implementations. Applied when moving logic to services, avoiding static calls, and wiring dependencies into services and controller actions (not console/event constructors). Key terms โ€” ServiceLocator, DI, services, autowire, PSR-11, dependency injection, container.

Installation

Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.

SKILL.md
readonly