1 | <?php |
||
11 | class SignupProviderForm extends \yii\base\Model |
||
12 | { |
||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | public $email; |
||
17 | /** |
||
18 | * @var \app\models\User |
||
19 | */ |
||
20 | private $user = null; |
||
21 | |||
22 | /** |
||
23 | * @param User $user |
||
24 | */ |
||
25 | public function __construct($user) |
||
29 | |||
30 | /** |
||
31 | * @inheritdoc |
||
32 | */ |
||
33 | public function rules() |
||
46 | |||
47 | /** |
||
48 | * @inheritdoc |
||
49 | */ |
||
50 | public function attributeLabels() |
||
54 | |||
55 | /** |
||
56 | * Create manually UploadedFile instance by file path |
||
57 | * |
||
58 | * @param string $path file path |
||
59 | * @return UploadedFile |
||
60 | */ |
||
61 | private function makeUploadedFile($path) |
||
75 | |||
76 | /** |
||
77 | * Save photo |
||
78 | * |
||
79 | * @param \app\models\UserProfile $profile |
||
80 | * @param string $photo |
||
81 | * @return void |
||
82 | */ |
||
83 | private function savePhoto($profile, $photo) |
||
92 | |||
93 | /** |
||
94 | * Signs user up |
||
95 | * |
||
96 | * @param bool $checkExistEmail |
||
97 | * @return \app\models\User |
||
98 | */ |
||
99 | public function signup($checkExistEmail = true) |
||
118 | |||
119 | /** |
||
120 | * Sends an email with a link, for confirm the email |
||
121 | * |
||
122 | * @return boolean |
||
123 | */ |
||
124 | public function sendEmail() |
||
141 | } |
||
142 |
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: