1 | <?php |
||
25 | class BadUserRoleException extends AbstractException { |
||
26 | |||
27 | use OriginUrlTrait, |
||
28 | RedirectUrlTrait; |
||
29 | |||
30 | /** |
||
31 | * Roles. |
||
32 | * |
||
33 | * @var array |
||
34 | */ |
||
35 | private $roles; |
||
36 | |||
37 | /** |
||
38 | * User. |
||
39 | * |
||
40 | * @var UserInterface |
||
41 | */ |
||
42 | private $user; |
||
43 | |||
44 | /** |
||
45 | * Constructor. |
||
46 | * |
||
47 | * @param UserInterface $user The user. |
||
48 | * @param array $roles The roles. |
||
49 | * @param string $redirectUrl The redirect. |
||
50 | * @param string $originUrl The route. |
||
51 | */ |
||
52 | public function __construct(UserInterface $user, array $roles, $redirectUrl, $originUrl) { |
||
59 | |||
60 | /** |
||
61 | * Get the roles. |
||
62 | * |
||
63 | * @return array Returns the roles. |
||
64 | */ |
||
65 | public function getRoles() { |
||
68 | |||
69 | /** |
||
70 | * Get the user. |
||
71 | * |
||
72 | * @return UserInterface Returns the user. |
||
73 | */ |
||
74 | public function getUser() { |
||
77 | |||
78 | /** |
||
79 | * Set the roles; |
||
80 | * |
||
81 | * @param array $roles The roles. |
||
82 | * @return BadUserRoleException Returns this bad user role exception. |
||
83 | */ |
||
84 | protected function setRoles(array $roles) { |
||
88 | |||
89 | /** |
||
90 | * Set the user. |
||
91 | * |
||
92 | * @param UserInterface $user The user. |
||
93 | * @return BadUserRoleException Returns this bad user role exception. |
||
94 | */ |
||
95 | protected function setUser(UserInterface $user) { |
||
99 | |||
100 | } |
||
101 |