From 0e1b386b23cef39d32f5ea45640dc1a081c87c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berislav=20Balogovi=C4=87?= Date: Tue, 23 Apr 2019 01:41:19 +0200 Subject: [PATCH] Document the SecurityUserValueResolver & Psr7ServerRequestResolver --- controller/argument_value_resolver.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/controller/argument_value_resolver.rst b/controller/argument_value_resolver.rst index c1204ce8aa6..3384ddf1279 100644 --- a/controller/argument_value_resolver.rst +++ b/controller/argument_value_resolver.rst @@ -42,6 +42,22 @@ Symfony ships with the following value resolvers in the HttpKernel component: argument list. When the action is called, the last (variadic) argument will contain all the values of this array. +Functionality Shipped with Additional Bundles +--------------------------------------------- + +The SecurityBundle: + +:class:`Symfony\\Bundle\\SecurityBundle\\SecurityUserValueResolver` + Injects the user object of the current logged in user if type-hinted + with ``UserInterface``. Default value can be set to ``null`` in case + the controller can be accessed by non logged in users. + +The SensioFrameworkExtraBundle: + +``Psr7ServerRequestResolver`` + Injects a PSR-7 compliant version of the current request if type-hinted with + ``RequestInterface``, ``MessageInterface`` or ``ServerRequestInterface``. + Adding a Custom Value Resolver ------------------------------