|
|
@ -437,11 +437,12 @@ class Dispatcher
|
|
|
|
public function resolveContainerClass(string $class, array &$params)
|
|
|
|
public function resolveContainerClass(string $class, array &$params)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// PSR-11
|
|
|
|
// PSR-11
|
|
|
|
if (
|
|
|
|
if (is_a($this->containerHandler, '\Psr\Container\ContainerInterface')) {
|
|
|
|
is_a($this->containerHandler, '\Psr\Container\ContainerInterface')
|
|
|
|
try {
|
|
|
|
&& $this->containerHandler->has($class)
|
|
|
|
|
|
|
|
) {
|
|
|
|
|
|
|
|
return $this->containerHandler->get($class);
|
|
|
|
return $this->containerHandler->get($class);
|
|
|
|
|
|
|
|
} catch (Throwable) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Just a callable where you configure the behavior (Dice, PHP-DI, etc.)
|
|
|
|
// Just a callable where you configure the behavior (Dice, PHP-DI, etc.)
|
|
|
|