85 lines
2.6 KiB
YAML
85 lines
2.6 KiB
YAML
|
name: ControllerResolver
|
||
|
class_comment: '# * This implementation uses the ''_controller'' request attribute
|
||
|
to determine
|
||
|
|
||
|
# * the controller to execute.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @author Fabien Potencier <fabien@symfony.com>
|
||
|
|
||
|
# * @author Tobias Schultze <http://tobion.de>'
|
||
|
dependencies:
|
||
|
- name: LoggerInterface
|
||
|
type: class
|
||
|
source: Psr\Log\LoggerInterface
|
||
|
- name: BadRequestException
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpFoundation\Exception\BadRequestException
|
||
|
- name: Request
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpFoundation\Request
|
||
|
- name: AsController
|
||
|
type: class
|
||
|
source: Symfony\Component\HttpKernel\Attribute\AsController
|
||
|
properties: []
|
||
|
methods:
|
||
|
- name: allowControllers
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: types
|
||
|
default: '[]'
|
||
|
- name: attributes
|
||
|
default: '[]'
|
||
|
comment: "# * This implementation uses the '_controller' request attribute to determine\n\
|
||
|
# * the controller to execute.\n# *\n# * @author Fabien Potencier <fabien@symfony.com>\n\
|
||
|
# * @author Tobias Schultze <http://tobion.de>\n# */\n# class ControllerResolver\
|
||
|
\ implements ControllerResolverInterface\n# {\n# private array $allowedControllerTypes\
|
||
|
\ = [];\n# private array $allowedControllerAttributes = [AsController::class =>\
|
||
|
\ AsController::class];\n# \n# public function __construct(\n# private ?LoggerInterface\
|
||
|
\ $logger = null,\n# ) {\n# }\n# \n# /**\n# * @param array<class-string> $types\n\
|
||
|
# * @param array<class-string> $attributes"
|
||
|
- name: getController
|
||
|
visibility: public
|
||
|
parameters:
|
||
|
- name: request
|
||
|
comment: '# * @throws BadRequestException when the request has attribute "_check_controller_is_allowed"
|
||
|
set to true and the controller is not allowed'
|
||
|
- name: createController
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: controller
|
||
|
comment: '# * Returns a callable for the given controller.
|
||
|
|
||
|
# *
|
||
|
|
||
|
# * @throws \InvalidArgumentException When the controller cannot be created'
|
||
|
- name: instantiateController
|
||
|
visibility: protected
|
||
|
parameters:
|
||
|
- name: class
|
||
|
comment: '# * Returns an instantiated controller.'
|
||
|
- name: getControllerError
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: callable
|
||
|
comment: null
|
||
|
- name: getClassMethodsWithoutMagicMethods
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: classOrObject
|
||
|
comment: null
|
||
|
- name: checkController
|
||
|
visibility: private
|
||
|
parameters:
|
||
|
- name: request
|
||
|
- name: controller
|
||
|
comment: null
|
||
|
traits:
|
||
|
- Psr\Log\LoggerInterface
|
||
|
- Symfony\Component\HttpFoundation\Exception\BadRequestException
|
||
|
- Symfony\Component\HttpFoundation\Request
|
||
|
- Symfony\Component\HttpKernel\Attribute\AsController
|
||
|
interfaces:
|
||
|
- ControllerResolverInterface
|