1 | <?php |
||
14 | class RedirectConfig |
||
15 | { |
||
16 | use SmartObject; |
||
17 | |||
18 | /** |
||
19 | * @var callable[] |
||
20 | */ |
||
21 | public $onBeforeApproveRedirect = []; |
||
22 | |||
23 | /** |
||
24 | * @var callable[] |
||
25 | */ |
||
26 | public $onBeforeLoginRedirect = []; |
||
27 | |||
28 | /** |
||
29 | * @var array |
||
30 | */ |
||
31 | private $approveDestination; |
||
32 | |||
33 | /** |
||
34 | * @var array |
||
35 | */ |
||
36 | private $loginDestination; |
||
37 | |||
38 | /** |
||
39 | * @param string|array|null $approveDestination |
||
40 | * @param string|array|null $loginDestination |
||
41 | */ |
||
42 | public function __construct($approveDestination, $loginDestination) |
||
47 | |||
48 | /** |
||
49 | * @param string|array|null $approveDestination |
||
50 | */ |
||
51 | public function setApproveDestination($approveDestination) |
||
55 | |||
56 | /** |
||
57 | * @param Component $component |
||
58 | * @throws InvalidStateException |
||
59 | */ |
||
60 | public function redirectToApproveDestination(Component $component) |
||
68 | |||
69 | /** |
||
70 | * @param string|array|null $loginDestination |
||
71 | */ |
||
72 | public function setLoginDestination($loginDestination) |
||
76 | |||
77 | /** |
||
78 | * @param Component $component |
||
79 | * @throws InvalidStateException |
||
80 | */ |
||
81 | public function redirectToLoginDestination(Component $component) |
||
89 | } |
||
90 |