-
Notifications
You must be signed in to change notification settings - Fork 46
Expand file tree
/
Copy pathEGithubUser.php
More file actions
64 lines (60 loc) · 1.05 KB
/
Copy pathEGithubUser.php
File metadata and controls
64 lines (60 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/**
*
*/
class EGithubUser extends EGithubModel
{
/**
* http://developer.github.com/v3/users/#get-a-single-user
* http://developer.github.com/v3/users/#get-the-authenticated-user
*
* @return array
*/
public function attributeNames()
{
return array(
'login',
'id',
'avatar_url',
//'gravatar_id',
'url',
'name',
'company',
'blog',
'location',
'email',
'hireable',
'bio',
'public_repos',
'public_gists',
'followers',
'following',
'html_url',
'created_at',
'type', // User
// for private users only
'total_private_repos',
'owned_private_repos',
'private_gists',
'disk_usage',
'collaborators',
// 'plan',
);
}
public function relations()
{
return array(
'plan' => array(static::RELATION_ONE, 'EGithubUserPlan'),
);
}
public function findScopes()
{
return array(
'find' => '/users'
);
}
public static function model($className=__CLASS__)
{
return parent::model($className);
}
}