1 | <?php |
||
13 | class SignupProviderForm extends \yii\base\Model |
||
14 | { |
||
15 | /** |
||
16 | * @var string |
||
17 | */ |
||
18 | public $email; |
||
19 | /** |
||
20 | * @var \app\models\entity\User |
||
21 | */ |
||
22 | private $user = null; |
||
23 | /** |
||
24 | * @var Tokenizer |
||
25 | */ |
||
26 | private $tokenizer; |
||
27 | |||
28 | /** |
||
29 | * @param User $user |
||
30 | */ |
||
31 | public function __construct(User $user, Tokenizer $tokenizer, $config = []) |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | */ |
||
43 | public function rules() |
||
56 | |||
57 | /** |
||
58 | * @inheritdoc |
||
59 | */ |
||
60 | public function attributeLabels() |
||
66 | |||
67 | /** |
||
68 | * Create manually UploadedFile instance by file path |
||
69 | * |
||
70 | * @param string $path file path |
||
71 | * @return UploadedFile |
||
72 | */ |
||
73 | private function makeUploadedFile(string $path): UploadedFile |
||
87 | |||
88 | /** |
||
89 | * Save photo |
||
90 | * |
||
91 | * @param \app\models\entity\UserProfile $profile |
||
92 | * @param string $photo |
||
93 | * @return void |
||
94 | */ |
||
95 | private function savePhoto(UserProfile $profile, string $photo): void |
||
106 | |||
107 | /** |
||
108 | * Login |
||
109 | */ |
||
110 | public function login(): void |
||
115 | |||
116 | /** |
||
117 | * Signs user up |
||
118 | * |
||
119 | * @throws Exception |
||
120 | * @return \app\models\entity\User |
||
121 | */ |
||
122 | public function signup(): User |
||
141 | |||
142 | /** |
||
143 | * Sends an email with a link, for confirm the email |
||
144 | * |
||
145 | * @throws UserException |
||
146 | */ |
||
147 | public function sendEmail(): void |
||
167 | } |
||
168 |
If you implement
__call
and you know which methods are available, you can improve IDE auto-completion and static analysis by adding a @method annotation to the class.This is often the case, when
__call
is implemented by a parent class and only the child class knows which methods exist: