Skip to content

Commit 5e020f8

Browse files
committed
minor #10045 Replace more occurrences of Controller by AbstractController (javiereguiluz)
This PR was merged into the 4.1 branch. Discussion ---------- Replace more occurrences of Controller by AbstractController This continues #10030. I also propose to replace some `ControllerTrait::` by `AbstractController::`. Let's not be pedantic about this. The helper methods are technically defined in the trait, but most people use them via the Abstract base controller. People advanced enough to not use `AbstractController` know perfectly how to use this trait. Commits ------- 80c3c29 Replace more occurrences of Controller by AbstractController
2 parents fc17e9f + 80c3c29 commit 5e020f8

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

controller.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ and many others that you'll learn about next.
120120
Generating URLs
121121
~~~~~~~~~~~~~~~
122122

123-
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::generateUrl`
123+
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::generateUrl`
124124
method is just a helper method that generates the URL for a given route::
125125

126126
$url = $this->generateUrl('app_lucky_number', array('max' => 10));
@@ -328,7 +328,7 @@ special type of exception::
328328
return $this->render(...);
329329
}
330330

331-
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\ControllerTrait::createNotFoundException`
331+
The :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::createNotFoundException`
332332
method is just a shortcut to create a special
333333
:class:`Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException`
334334
object, which ultimately triggers a 404 HTTP response inside Symfony.
@@ -581,7 +581,7 @@ the :phpfunction:`json_encode` function is used.
581581
Streaming File Responses
582582
~~~~~~~~~~~~~~~~~~~~~~~~
583583

584-
You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::file`
584+
You can use the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::file`
585585
helper to serve a file from inside a controller::
586586

587587
public function download()

controller/forwarding.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ How to Forward Requests to another Controller
55
=============================================
66

77
Though not very common, you can also forward to another controller internally
8-
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::forward`
8+
with the :method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::forward`
99
method. Instead of redirecting the user's browser, this makes an "internal"
1010
sub-request and calls the defined controller. The ``forward()`` method returns
1111
the :class:`Symfony\\Component\\HttpFoundation\\Response` object that is returned

security/csrf.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ token and store it as a hidden field of the form:
279279
</form>
280280
281281
Then, get the value of the CSRF token in the controller action and use the
282-
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller::isCsrfTokenValid`
282+
:method:`Symfony\\Bundle\\FrameworkBundle\\Controller\\AbstractController::isCsrfTokenValid`
283283
to check its validity::
284284

285285
use Symfony\Component\HttpFoundation\Request;

0 commit comments

Comments
 (0)