Skip to content

InjectorMiddlewareResolver


Properties

container

public \Psr\Container\ContainerInterface $container

Methods

__construct

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

Parameters:

Parameter Type Description
$container \Psr\Container\ContainerInterface

resolve

Resolves a middleware

public resolve(mixed $definition): \Psr\Http\Server\MiddlewareInterface|callable

Parameters:

Parameter Type Description
$definition mixed

Throws:


parseArguments

Parses arguments into 2 different formats:

protected parseArguments(string $argString): array{0: array<int,string>, 1: array<string,string>}
  • positional: ['manage:users', '/no-access']
  • key-value: ['permission' => 'manage:users', 'redirect' => '/no-access']

Parameters:

Parameter Type Description
$argString string