ContainerBasedHandlerLocator
in package
implements
HandlerLocator
Lazily loads Command Handlers from the Symfony DI container
Interfaces, Classes and Traits
- HandlerLocator
- Service locator for handler objects
Table of Contents
- $commandToServiceId : array<string|int, mixed>
- $container : ContainerInterface
- __construct() : mixed
- getHandlerForCommand() : object
- Retrieves the handler for a specified command
Properties
$commandToServiceId
private
array<string|int, mixed>
$commandToServiceId
= []
$container
private
ContainerInterface
$container
Methods
__construct()
public
__construct(ContainerInterface $container, array<string|int, mixed> $commandToServiceIdMapping) : mixed
Parameters
- $container : ContainerInterface
- $commandToServiceIdMapping : array<string|int, mixed>
Return values
mixed —getHandlerForCommand()
Retrieves the handler for a specified command
public
getHandlerForCommand(string $commandName) : object
Parameters
- $commandName : string