1 | <?php |
||
10 | class SignupProviderForm extends \yii\base\Model |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | public $email; |
||
16 | /** |
||
17 | * @var \app\models\User |
||
18 | */ |
||
19 | private $user = null; |
||
20 | |||
21 | /** |
||
22 | * @param User $user |
||
23 | */ |
||
24 | 8 | public function __construct($user) |
|
28 | |||
29 | /** |
||
30 | * @inheritdoc |
||
31 | */ |
||
32 | 8 | public function rules() |
|
45 | |||
46 | /** |
||
47 | * @inheritdoc |
||
48 | */ |
||
49 | 7 | public function attributeLabels() |
|
53 | |||
54 | /** |
||
55 | * Save photo |
||
56 | * |
||
57 | * @param \app\models\UserProfile $profile |
||
58 | * @param string $photo |
||
59 | * @return void |
||
60 | */ |
||
61 | 6 | private function savePhoto($profile, $photo) |
|
70 | |||
71 | /** |
||
72 | * Signs user up |
||
73 | * |
||
74 | * @param bool $checkExistEmail |
||
75 | * @return \app\models\User |
||
76 | */ |
||
77 | 8 | public function signup($checkExistEmail = true) |
|
96 | |||
97 | /** |
||
98 | * Sends an email with a link, for confirm the email |
||
99 | * |
||
100 | * @return boolean |
||
101 | */ |
||
102 | public function sendEmail() |
||
119 | } |
||
120 |
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: