File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?php
2+
3+ /**
4+ *
5+ * User entity
6+ *
7+ * @copyright Apereo
8+ * @category OpenLRW
9+ * @package Entity
10+ * @author Xavier Chopin <bonjour@xavierchop.in>
11+ * @license http://www.osedu.org/licenses/ECL-2.0 ECL-2.0 License
12+ */
13+
14+ namespace OpenLRW \Model ;
15+
16+ class User extends OneRoster
17+ {
18+
19+ protected static $ collection = 'users ' ;
20+
21+ protected $ fillable = [
22+ 'sourcedId ' ,
23+ 'status ' ,
24+ 'metadata ' ,
25+ 'username ' ,
26+ 'userId ' ,
27+ 'givenName ' ,
28+ 'familyName ' ,
29+ 'role ' ,
30+ 'identifier" ' ,
31+ 'email ' ,
32+ 'sms ' ,
33+ 'phone '
34+ ];
35+
36+
37+ public static function enrollments (String $ id )
38+ {
39+ return parent ::get (static ::$ collection . "/ $ id/enrollments " );
40+ }
41+
42+ public static function events (String $ id )
43+ {
44+ return parent ::get (static ::$ collection . "/ $ id/events " );
45+ }
46+
47+ public static function eventsFrom (String $ id , String $ from )
48+ {
49+ return parent ::get (static ::$ collection . "/ $ id/events?from= $ from " );
50+ }
51+
52+ public static function eventsFromTo (String $ id , String $ from , String $ to )
53+ {
54+ return parent ::get (static ::$ collection . "/ $ id/events?from= $ from&to= $ to " );
55+ }
56+
57+ }
You can’t perform that action at this time.
0 commit comments