Skip to content

NativeQueryHandlerResolver

Properties

handlers

protected array $handlers

container

protected ?\Codefy\CommandBus\Container $container

Methods

__construct

public __construct(?\Codefy\CommandBus\Container $container = null): mixed

Parameters:

Parameter Type Description
$container ?\Codefy\CommandBus\Container

resolve

Retrieve a QueryHandler for a given Command

public resolve(\Codefy\QueryBus\Query $query): \Codefy\QueryBus\QueryHandler

Parameters:

Parameter Type Description
$query \Codefy\QueryBus\Query

Throws:


bindHandler

Bind a handler to a query. These bindings should overrule the default resolution behavior for this resolver.

public bindHandler(string $queryName, callable|string|\Codefy\QueryBus\QueryHandler $handler): void

Parameters:

Parameter Type Description
$queryName string
$handler callable|string|\Codefy\QueryBus\QueryHandler

Throws:



Automatically generated on 2025-10-13