1 | <?php |
||
19 | trait ApprovePresenterTrait |
||
20 | { |
||
21 | use SecuredLinksPresenterTrait; |
||
22 | |||
23 | /** |
||
24 | * @var IApproveControlFactory |
||
25 | * @inject |
||
26 | */ |
||
27 | public $approveControlFactory; |
||
28 | |||
29 | /** |
||
30 | * @var IAuthorizationRequestSerializer |
||
31 | * @inject |
||
32 | */ |
||
33 | public $authorizationRequestSerializer; |
||
34 | |||
35 | /** |
||
36 | * @var RedirectConfig |
||
37 | * @inject |
||
38 | */ |
||
39 | public $redirectConfig; |
||
40 | |||
41 | /** |
||
42 | * @return ApproveControl |
||
43 | * @throws AbortException |
||
44 | * @throws BadRequestException |
||
45 | */ |
||
46 | protected function createComponentApprove(): ApproveControl |
||
69 | |||
70 | /** |
||
71 | * @param string|null $message |
||
72 | * @param int $code |
||
73 | * @throws BadRequestException |
||
74 | */ |
||
75 | abstract public function error($message = null, $code = HttpResponse::S404_NOT_FOUND); |
||
76 | |||
77 | /** |
||
78 | * @param string|null $namespace |
||
79 | * @return Session|SessionSection |
||
80 | */ |
||
81 | abstract public function getSession($namespace = null); |
||
82 | |||
83 | /** |
||
84 | * @return User |
||
85 | */ |
||
86 | abstract public function getUser(); |
||
87 | |||
88 | /** |
||
89 | * @param int $code [optional] |
||
90 | * @param string|null $destination |
||
91 | * @param array|mixed $args |
||
92 | * @throws AbortException |
||
93 | */ |
||
94 | abstract public function redirect($code, $destination = null, $args = []); |
||
95 | |||
96 | /** |
||
97 | * @param IResponse $response |
||
98 | * @throws AbortException |
||
99 | */ |
||
100 | abstract public function sendResponse(IResponse $response); |
||
101 | } |
||
102 |