1 | <?php |
||
3 | class InvitationForm extends CFormModel |
||
|
|||
4 | { |
||
5 | /** |
||
6 | * The email of the user to invite |
||
7 | * @var string $email |
||
8 | */ |
||
9 | public $email; |
||
10 | |||
11 | /** |
||
12 | * Validation rules |
||
13 | * @return array |
||
14 | */ |
||
15 | public function rules() |
||
23 | |||
24 | /** |
||
25 | * Validates that a user with that email address isn't already invited |
||
26 | * @param array $attributes |
||
27 | * @param array $params |
||
28 | * @return boolean |
||
29 | */ |
||
30 | public function userExists($attributes, $params) |
||
40 | |||
41 | /** |
||
42 | * Attribute labels |
||
43 | * @return array |
||
44 | */ |
||
45 | public function attributeLabels() |
||
51 | |||
52 | /** |
||
53 | * Sends an invite to a new user |
||
54 | * @return boolean |
||
55 | */ |
||
56 | public function invite() |
||
106 | } |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.