1 | <?php |
||
12 | trait ErrorHandling |
||
13 | { |
||
14 | |||
15 | protected function dispatchAccessDeniedResponse() |
||
19 | |||
20 | protected function dispatchNotFoundResponse() |
||
24 | |||
25 | /** |
||
26 | * Returns a NotFoundHttpException. |
||
27 | * |
||
28 | * This will result in a 404 response code. Usage example: |
||
29 | * |
||
30 | * throw $this->createNotFoundException('Page not found!'); |
||
31 | */ |
||
32 | protected function createNotFoundException( |
||
38 | |||
39 | /** |
||
40 | * Returns an AccessDeniedException. |
||
41 | * |
||
42 | * This will result in a 403 response code. Usage example: |
||
43 | * |
||
44 | * throw $this->createAccessDeniedException('Unable to access this page!'); |
||
45 | * |
||
46 | * @throws \LogicException If the Security component is not available |
||
47 | */ |
||
48 | protected function createAccessDeniedException( |
||
58 | } |
||
59 |