1 | <?php |
||
17 | trait ProtectedController |
||
18 | { |
||
19 | /** |
||
20 | * @var bool Contain login status |
||
21 | */ |
||
22 | protected $authentication = false; |
||
23 | |||
24 | /** |
||
25 | * Allow access to controller only if logged. |
||
26 | * |
||
27 | * @param Authenticate $authenticate |
||
28 | * @param string $redirect |
||
29 | */ |
||
30 | 2 | protected function protect(Authenticate $authenticate, string $redirect) |
|
36 | } |
||
37 |