-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAbstractController.php
More file actions
37 lines (30 loc) · 859 Bytes
/
AbstractController.php
File metadata and controls
37 lines (30 loc) · 859 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php
namespace src\controller;
use src\service\auth\AuthService;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException;
/**
* Class AbstractController
* @package src\controller
*/
abstract class AbstractController
{
/** @var ContainerBuilder */
protected $container;
/** @var RequestStack */
protected $request;
/** @var AuthService */
protected $auth;
/**
* AbstractController constructor.
* @param ContainerBuilder $container
* @throws \Exception
*/
public function __construct(ContainerBuilder $container)
{
$this->container = $container;
$this->auth = $container->get('auth');
$this->request = $container->get('request_stack');
}
}