1 | <?php |
||
19 | class UserProvider extends \yii\db\ActiveRecord |
||
20 | { |
||
21 | const TYPE_TWITTER = 1; |
||
22 | const TYPE_FACEBOOK = 2; |
||
23 | const TYPE_VKONTAKTE = 3; |
||
24 | |||
25 | /** |
||
26 | * @inheritdoc |
||
27 | */ |
||
28 | public static function tableName() |
||
32 | |||
33 | /** |
||
34 | * @inheritdoc |
||
35 | */ |
||
36 | public function rules() |
||
44 | |||
45 | /** |
||
46 | * @inheritdoc |
||
47 | * @return UserProviderQuery |
||
48 | */ |
||
49 | public static function find() |
||
53 | |||
54 | /** |
||
55 | * @return \yii\db\ActiveQuery |
||
56 | */ |
||
57 | public function getUser() |
||
61 | |||
62 | /** |
||
63 | * Get types |
||
64 | * |
||
65 | * @return array |
||
66 | */ |
||
67 | public static function getTypes(): array |
||
75 | |||
76 | /** |
||
77 | * Get type by id |
||
78 | * |
||
79 | * @return string $name |
||
80 | * @return int |
||
81 | */ |
||
82 | public static function getTypeByName(string $name): int |
||
87 | |||
88 | /** |
||
89 | * Get type name |
||
90 | * |
||
91 | * @return string |
||
92 | */ |
||
93 | public function getTypeName(): string |
||
98 | } |
||
99 |