1 | <?php |
||
18 | class UserProvider extends \yii\db\ActiveRecord |
||
19 | { |
||
20 | const TYPE_TWITTER = 1; |
||
21 | const TYPE_FACEBOOK = 2; |
||
22 | const TYPE_VKONTAKTE = 3; |
||
23 | |||
24 | /** |
||
25 | * @inheritdoc |
||
26 | */ |
||
27 | 10 | public static function tableName() |
|
31 | |||
32 | /** |
||
33 | * @return \yii\db\ActiveQuery |
||
34 | */ |
||
35 | public function getUser() |
||
39 | |||
40 | /** |
||
41 | * @inheritdoc |
||
42 | * @return \query\UserProviderQuery the active query used by this AR class. |
||
43 | */ |
||
44 | 10 | public static function find() |
|
48 | |||
49 | /** |
||
50 | * Get types |
||
51 | * |
||
52 | * @return array |
||
53 | */ |
||
54 | public static function getTypes(): array |
||
62 | |||
63 | /** |
||
64 | * Get type by id |
||
65 | * |
||
66 | * @return string $name |
||
67 | * @return int |
||
68 | */ |
||
69 | public static function getTypeByName(string $name): int |
||
74 | |||
75 | /** |
||
76 | * Get type name |
||
77 | * |
||
78 | * @return string |
||
79 | */ |
||
80 | public function getTypeName(): string |
||
85 | } |
||
86 |