rename Psr\Container\ContainerInterface -> Container

dispatcher-rework
fadrian06 5 days ago
parent 6c5d9de3ca
commit 12607d9500

@ -7,7 +7,7 @@ namespace flight\core;
use Exception; use Exception;
use flight\Engine; use flight\Engine;
use InvalidArgumentException; use InvalidArgumentException;
use Psr\Container\ContainerInterface; use Psr\Container\ContainerInterface as Container;
use ReflectionFunction; use ReflectionFunction;
use Throwable; use Throwable;
use TypeError; use TypeError;
@ -41,21 +41,11 @@ class Dispatcher
*/ */
protected array $filters = []; protected array $filters = [];
/** /** @var null|Container|(callable(class-string<object> $classString, mixed[] $params): ?object) */
* This is a container for the dependency injection.
*
* @var null|ContainerInterface|(callable(string $classString, array<int, mixed> $params): (null|object))
*/
protected $containerHandler = null; protected $containerHandler = null;
/** /**
* Sets the dependency injection container handler. * @param Container|(callable(class-string<object> $classString, mixed[] $params): ?object) $containerHandler
*
* @param ContainerInterface|(callable(class-string<T> $classString, array<int, mixed> $params): ?T) $containerHandler
* Dependency injection container.
*
* @template T of object
*
* @throws InvalidArgumentException * @throws InvalidArgumentException
* If $containerHandler is not a `callable` or instance of `Psr\Container\ContainerInterface`. * If $containerHandler is not a `callable` or instance of `Psr\Container\ContainerInterface`.
*/ */

Loading…
Cancel
Save