1<?php
2
3/*
4 * Presentation of ecs enrolment status
5 * @author Stefan Meyer <smeyer.ilias@gmx.de>
6 * $Id$
7 */
8class ilECSEnrolmentStatus
9{
10    const STATUS_ACTIVE = 'active';
11    const STATUS_PENDING = 'pending';
12    const STATUS_DENIED = 'denied';
13    const STATUS_REJECTED = 'rejected';
14    const STATUS_UNSUBSCRIBED = 'unsubscribed';
15    const STATUS_ACCOUNT_DEACTIVATED = 'account_deactivated';
16
17    const ID_EPPN = 'ecs_ePPN';
18    const ID_LOGIN_UID = 'ecs_loginUID';
19    const ID_LOGIN = 'ecs_login';
20    const ID_UID = 'ecs_uid';
21    const ID_EMAIL = 'ecs_email';
22    const ID_PERSONAL_UNIQUE_CODE = 'ecs_PersonalUniqueCode';
23    const ID_CUSTOM = 'ecs_custom';
24
25
26    // json fields
27    public $url = '';
28    public $id = '';
29    public $personID = '';
30    public $personIDtype = '';
31    public $status = '';
32
33
34    public function __construct()
35    {
36    }
37
38    public function setUrl($a_url)
39    {
40        $this->url = $a_url;
41    }
42
43    public function getUrl()
44    {
45        return $this->url;
46    }
47
48    public function setId($a_id)
49    {
50        $this->id = $a_id;
51    }
52
53    public function getId()
54    {
55        return $this->id;
56    }
57
58    public function setPersonId($a_person)
59    {
60        $this->personID = $a_person;
61    }
62
63    public function getPersonId()
64    {
65        return $this->personID;
66    }
67
68    public function setPersonIdType($a_type)
69    {
70        $this->personIDtype = $a_type;
71    }
72
73    public function getPersonIdType()
74    {
75        return $this->personIDtype;
76    }
77
78    public function setStatus($a_status)
79    {
80        $this->status = $a_status;
81    }
82
83    public function getStatus()
84    {
85        return $this->status;
86    }
87
88    public function loadFromJson($json)
89    {
90        $this->setId($json->id);
91        $this->setPersonId($json->personID);
92        $this->setPersonIdType($json->personIDtype);
93        $this->setUrl($json->url);
94        $this->setStatus($json->status);
95    }
96}
97