Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 82d29b0

Browse filesBrowse files
committed
Change all the added methods to be protected
Change redirectToRoute, addFlash, isGranted and checkGranted access to protected
1 parent 3ccb17d commit 82d29b0
Copy full SHA for 82d29b0

File tree

Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-4
lines changed

‎src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/FrameworkBundle/Controller/Controller.php
+4-4Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function redirect($url, $status = 302)
8989
*
9090
* @return RedirectResponse
9191
*/
92-
public function redirectToRoute($route, array $parameters = array(), $status = 302)
92+
protected function redirectToRoute($route, array $parameters = array(), $status = 302)
9393
{
9494
return new RedirectResponse($this->generateUrl($route, $parameters), $status);
9595
}
@@ -100,7 +100,7 @@ public function redirectToRoute($route, array $parameters = array(), $status = 3
100100
* @param string $type The type
101101
* @param string $message The message
102102
*/
103-
public function addFlash($type, $message)
103+
protected function addFlash($type, $message)
104104
{
105105
$this->get('session')->getFlashBag()->add($type, $message);
106106
}
@@ -113,7 +113,7 @@ public function addFlash($type, $message)
113113
*
114114
* @return bool
115115
*/
116-
public function isGranted($attributes, $object = null)
116+
protected function isGranted($attributes, $object = null)
117117
{
118118
return $this->get('security.context')->isGranted($attributes, $object);
119119
}
@@ -127,7 +127,7 @@ public function isGranted($attributes, $object = null)
127127
*
128128
* @throws \Symfony\Component\Security\Core\Exception\AccessDeniedException
129129
*/
130-
public function checkGranted($attributes, $object = null)
130+
protected function checkGranted($attributes, $object = null)
131131
{
132132
if (!$this->isGranted($attributes, $object)) {
133133
throw $this->createAccessDeniedException();

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.