Skip to content
docsv0.1.0

ContainerHandlerResolver

The concrete `milpa/http` {@see HandlerResolverInterface}: pulls the controller named by a {@see HandlerReference} out of a PSR-11 container and wraps it, together with the reference's method name, in a {@see CallableRequestHandler}.

ContainerHandlerResolver::__construct()

public function __construct(Psr\Container\ContainerInterface $container):

Parameters

Parameters of __construct()
NameTypeDescription
$containerPsr\Container\ContainerInterface

ContainerHandlerResolver::resolve()

public function resolve(Milpa\Http\Routing\HandlerReference $reference): Psr\Http\Server\RequestHandlerInterface

Resolves a handler reference into an executable PSR-15 request handler.

Parameters

Parameters of resolve()
NameTypeDescription
$referenceMilpa\Http\Routing\HandlerReference