1 | <?php |
||
14 | class Doorman |
||
15 | { |
||
16 | public $error = ''; |
||
17 | |||
18 | /** |
||
19 | * @var BaseInvite |
||
20 | */ |
||
21 | protected $invite; |
||
22 | |||
23 | 38 | public function __construct(BaseInvite $invite) |
|
27 | |||
28 | /** |
||
29 | * @param $code |
||
30 | * @param string|null $email |
||
31 | * @throws ExpiredInviteCode |
||
32 | * @throws InvalidInviteCode |
||
33 | * @throws MaxUsesReached |
||
34 | * @throws NotYourInviteCode |
||
35 | */ |
||
36 | 10 | public function redeem($code, string $email = null) |
|
42 | |||
43 | /** |
||
44 | * @param $code |
||
45 | * @param string|null $email |
||
46 | * |
||
47 | * @return bool |
||
48 | */ |
||
49 | 11 | public function check($code, string $email = null) |
|
59 | |||
60 | /** |
||
61 | * @param $code |
||
62 | * @param string|null $email |
||
63 | * |
||
64 | * @return \Clarkeash\Doorman\Models\BaseInvite |
||
65 | * @throws \Clarkeash\Doorman\Exceptions\ExpiredInviteCode |
||
66 | * @throws \Clarkeash\Doorman\Exceptions\InvalidInviteCode |
||
67 | * @throws \Clarkeash\Doorman\Exceptions\MaxUsesReached |
||
68 | * @throws \Clarkeash\Doorman\Exceptions\NotYourInviteCode |
||
69 | */ |
||
70 | 21 | protected function prep($code, string $email = null) |
|
78 | |||
79 | /** |
||
80 | * @param $code |
||
81 | * |
||
82 | * @return \Clarkeash\Doorman\Models\BaseInvite |
||
83 | * @throws \Clarkeash\Doorman\Exceptions\InvalidInviteCode |
||
84 | */ |
||
85 | 21 | protected function lookupInvite($code): BaseInvite |
|
93 | |||
94 | /** |
||
95 | * @param \Clarkeash\Doorman\Models\BaseInvite $invite |
||
96 | * @param string|null $email |
||
97 | * |
||
98 | * @throws \Clarkeash\Doorman\Exceptions\ExpiredInviteCode |
||
99 | * @throws \Clarkeash\Doorman\Exceptions\MaxUsesReached |
||
100 | * @throws \Clarkeash\Doorman\Exceptions\NotYourInviteCode |
||
101 | */ |
||
102 | 19 | protected function validateInvite(BaseInvite $invite, string $email = null) |
|
116 | |||
117 | /** |
||
118 | * @return Generator |
||
119 | */ |
||
120 | 17 | public function generate() |
|
124 | } |
||
125 |
This check looks for access to methods that are not accessible from the current context.
If you need to make a method accessible to another context you can raise its visibility level in the defining class.