File tree 11 files changed +55
-22
lines changed
Tests/Functional/Bundle/TestBundle/Controller
SecurityBundle/Tests/Functional/Bundle
CsrfFormLoginBundle/Controller
FormLoginBundle/Controller
Component/HttpKernel/Bundle
11 files changed +55
-22
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \HttpFoundation \Request ;
15
17
use Symfony \Component \HttpFoundation \Response ;
16
18
use Symfony \Component \HttpFoundation \RedirectResponse ;
17
19
use Symfony \Component \HttpFoundation \StreamedResponse ;
18
- use Symfony \Component \DependencyInjection \ContainerAware ;
19
20
use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
20
21
use Symfony \Component \HttpKernel \HttpKernelInterface ;
21
22
use Symfony \Component \Security \Core \Exception \AccessDeniedException ;
35
36
*
36
37
* @author Fabien Potencier <fabien@symfony.com>
37
38
*/
38
- abstract class Controller extends ContainerAware
39
+ abstract class Controller implements ContainerAwareInterface
39
40
{
41
+ use ContainerAwareTrait;
42
+
40
43
/**
41
44
* Generates a URL from the given parameters.
42
45
*
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Controller ;
13
13
14
- use Symfony \Component \DependencyInjection \ContainerAware ;
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
15
16
use Symfony \Component \HttpFoundation \RedirectResponse ;
16
17
use Symfony \Component \HttpFoundation \Request ;
17
18
use Symfony \Component \HttpFoundation \Response ;
23
24
*
24
25
* @author Fabien Potencier <fabien@symfony.com>
25
26
*/
26
- class RedirectController extends ContainerAware
27
+ class RedirectController implements ContainerAwareInterface
27
28
{
29
+ use ContainerAwareTrait;
30
+
28
31
/**
29
32
* Redirects to another route with the given name.
30
33
*
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Controller ;
13
13
14
- use Symfony \Component \DependencyInjection \ContainerAware ;
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
15
16
use Symfony \Component \HttpFoundation \Response ;
16
17
17
18
/**
18
19
* TemplateController.
19
20
*
20
21
* @author Fabien Potencier <fabien@symfony.com>
21
22
*/
22
- class TemplateController extends ContainerAware
23
+ class TemplateController implements ContainerAwareInterface
23
24
{
25
+ use ContainerAwareTrait;
26
+
24
27
/**
25
28
* Renders a template.
26
29
*
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \Functional \Bundle \TestBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \HttpFoundation \Request ;
15
17
use Symfony \Component \HttpFoundation \Response ;
16
- use Symfony \Component \DependencyInjection \ContainerAware ;
17
18
18
- class FragmentController extends ContainerAware
19
+ class FragmentController implements ContainerAwareInterface
19
20
{
21
+ use ContainerAwareTrait;
22
+
20
23
public function indexAction (Request $ request )
21
24
{
22
25
return $ this ->container ->get ('templating ' )->renderResponse ('fragment.html.php ' , array ('bar ' => new Bar ()));
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \Functional \Bundle \TestBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \HttpFoundation \Response ;
15
- use Symfony \Component \DependencyInjection \ContainerAware ;
16
17
17
- class ProfilerController extends ContainerAware
18
+ class ProfilerController implements ContainerAwareInterface
18
19
{
20
+ use ContainerAwareTrait;
21
+
19
22
public function indexAction ()
20
23
{
21
24
return new Response ('Hello ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \Functional \Bundle \TestBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \HttpFoundation \Request ;
15
17
use Symfony \Component \HttpFoundation \Response ;
16
18
use Symfony \Component \HttpFoundation \RedirectResponse ;
17
- use Symfony \Component \DependencyInjection \ContainerAware ;
18
19
19
- class SessionController extends ContainerAware
20
+ class SessionController implements ContainerAwareInterface
20
21
{
22
+ use ContainerAwareTrait;
23
+
21
24
public function welcomeAction (Request $ request , $ name = null )
22
25
{
23
26
$ session = $ request ->getSession ();
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Tests \Functional \Bundle \TestBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \HttpFoundation \Request ;
15
17
use Symfony \Component \HttpFoundation \Response ;
16
- use Symfony \Component \DependencyInjection \ContainerAware ;
17
18
use Symfony \Component \HttpKernel \Controller \ControllerReference ;
18
19
19
- class SubRequestController extends ContainerAware
20
+ class SubRequestController implements ContainerAwareInterface
20
21
{
22
+ use ContainerAwareTrait;
23
+
21
24
public function indexAction ()
22
25
{
23
26
$ handler = $ this ->container ->get ('fragment.handler ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \SecurityBundle \Tests \Functional \Bundle \CsrfFormLoginBundle \Controller ;
13
13
14
- use Symfony \Component \DependencyInjection \ContainerAware ;
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
15
16
use Symfony \Component \HttpFoundation \Response ;
16
17
use Symfony \Component \Security \Core \Exception \AccessDeniedException ;
17
18
18
- class LoginController extends ContainerAware
19
+ class LoginController implements ContainerAwareInterface
19
20
{
21
+ use ContainerAwareTrait;
22
+
20
23
public function loginAction ()
21
24
{
22
25
$ form = $ this ->container ->get ('form.factory ' )->create ('Symfony\Bundle\SecurityBundle\Tests\Functional\Bundle\CsrfFormLoginBundle\Form\UserLoginType ' );
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \SecurityBundle \Tests \Functional \Bundle \FormLoginBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \Security \Core \Security ;
15
17
use Symfony \Component \HttpFoundation \Request ;
16
18
use Symfony \Component \HttpFoundation \Response ;
17
- use Symfony \Component \DependencyInjection \ContainerAware ;
18
19
19
- class LocalizedController extends ContainerAware
20
+ class LocalizedController implements ContainerAwareInterface
20
21
{
22
+ use ContainerAwareTrait;
23
+
21
24
public function loginAction (Request $ request )
22
25
{
23
26
// get the login error if there is one
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \SecurityBundle \Tests \Functional \Bundle \FormLoginBundle \Controller ;
13
13
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
14
16
use Symfony \Component \Security \Core \Exception \AccessDeniedException ;
15
17
use Symfony \Component \HttpFoundation \Request ;
16
18
use Symfony \Component \HttpFoundation \Response ;
17
19
use Symfony \Component \Security \Core \Security ;
18
- use Symfony \Component \DependencyInjection \ContainerAware ;
19
20
20
- class LoginController extends ContainerAware
21
+ class LoginController implements ContainerAwareInterface
21
22
{
23
+ use ContainerAwareTrait;
24
+
22
25
public function loginAction (Request $ request )
23
26
{
24
27
// get the login error if there is one
Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Component \HttpKernel \Bundle ;
13
13
14
- use Symfony \Component \DependencyInjection \ContainerAware ;
14
+ use Symfony \Component \DependencyInjection \ContainerAwareInterface ;
15
+ use Symfony \Component \DependencyInjection \ContainerAwareTrait ;
15
16
use Symfony \Component \DependencyInjection \ContainerBuilder ;
16
17
use Symfony \Component \DependencyInjection \Container ;
17
18
use Symfony \Component \Console \Application ;
24
25
*
25
26
* @author Fabien Potencier <fabien@symfony.com>
26
27
*/
27
- abstract class Bundle extends ContainerAware implements BundleInterface
28
+ abstract class Bundle implements BundleInterface
28
29
{
30
+ use ContainerAwareTrait;
31
+
29
32
protected $ name ;
30
33
protected $ extension ;
31
34
protected $ path ;
You can’t perform that action at this time.