From 80c3c29223c5a54888151b8985233b206565617e Mon Sep 17 00:00:00 2001 From: Javier Eguiluz Date: Wed, 11 Jul 2018 17:26:03 +0200 Subject: [PATCH] Replace more occurrences of Controller by AbstractController --- controller.rst | 6 +++--- controller/forwarding.rst | 2 +- security/csrf.rst | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/controller.rst b/controller.rst index 413a44950db..03c182e04e1 100644 --- a/controller.rst +++ b/controller.rst @@ -120,7 +120,7 @@ and many others that you'll learn about next. Generating URLs ~~~~~~~~~~~~~~~ -The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::generateUrl` +The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::generateUrl` method is just a helper method that generates the URL for a given route:: $url = $this->generateUrl('app_lucky_number', array('max' => 10)); @@ -328,7 +328,7 @@ special type of exception:: return $this->render(...); } -The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::createNotFoundException` +The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::createNotFoundException` method is just a shortcut to create a special :class:`Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException` object, which ultimately triggers a 404 HTTP response inside Symfony. @@ -581,7 +581,7 @@ the :phpfunction:`json_encode` function is used. Streaming File Responses ~~~~~~~~~~~~~~~~~~~~~~~~ -You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::file` +You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::file` helper to serve a file from inside a controller:: public function download() diff --git a/controller/forwarding.rst b/controller/forwarding.rst index 47ec70e9425..cad91be1b32 100644 --- a/controller/forwarding.rst +++ b/controller/forwarding.rst @@ -5,7 +5,7 @@ How to Forward Requests to another Controller ============================================= Though not very common, you can also forward to another controller internally -with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward` +with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::forward` method. Instead of redirecting the user's browser, this makes an "internal" sub-request and calls the defined controller. The ``forward()`` method returns the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned diff --git a/security/csrf.rst b/security/csrf.rst index 71a2c0e380f..9ae1370370d 100644 --- a/security/csrf.rst +++ b/security/csrf.rst @@ -279,7 +279,7 @@ token and store it as a hidden field of the form: Then, get the value of the CSRF token in the controller action and use the -:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::isCsrfTokenValid` +:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::isCsrfTokenValid` to check its validity:: use Symfony\Component\HttpFoundation\Request;