ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilECSParticipant.php
Go to the documentation of this file.
1<?php
2/*
3 +-----------------------------------------------------------------------------+
4 | ILIAS open source |
5 +-----------------------------------------------------------------------------+
6 | Copyright (c) 1998-2006 ILIAS open source, University of Cologne |
7 | |
8 | This program is free software; you can redistribute it and/or |
9 | modify it under the terms of the GNU General Public License |
10 | as published by the Free Software Foundation; either version 2 |
11 | of the License, or (at your option) any later version. |
12 | |
13 | This program is distributed in the hope that it will be useful, |
14 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | GNU General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU General Public License |
19 | along with this program; if not, write to the Free Software |
20 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21 +-----------------------------------------------------------------------------+
22*/
23
34{
35 protected $json_obj;
36 protected $cid;
37 protected $mid;
38 protected $email;
39 protected $certid;
40 protected $dns;
41 protected $description;
43 protected $is_self;
44
52 public function __construct($json_obj,$a_cid)
53 {
54 $this->json_obj = $json_obj;
55 $this->cid = $a_cid;
56 $this->read();
57 }
58
65 public function getCommunityId()
66 {
67 return $this->cid;
68 }
69
77 public function getMID()
78 {
79 return $this->mid;
80 }
81
88 public function getEmail()
89 {
90 return $this->email;
91 }
92
93
101 public function getDNS()
102 {
103 return $this->dns;
104 }
105
112 public function getDescription()
113 {
114 return $this->description;
115 }
116
123 public function getParticipantName()
124 {
126 }
127
134 public function getAbbreviation()
135 {
136 return $this->abr;
137 }
138
146 public function isPublishable()
147 {
148 return $this->isSelf();
149 }
150
158 public function isSelf()
159 {
160 return (bool) $this->is_self;
161 }
162
163
170 public function isEnabled()
171 {
172 $GLOBALS['ilLog']->write(__METHOD__.': Using deprecated call');
173 $GLOBALS['ilLog']->logStack();
174 return false;
175 }
176
181 public function getOrganisation()
182 {
183 return $this->org;
184 }
185
192 private function read()
193 {
194 global $ilLog;
195
196 $this->mid = $this->json_obj->mid;
197 $this->email = $this->json_obj->email;
198 #$this->certid = hexdec($this->json_obj->certid);
199 $this->dns = $this->json_obj->dns;
200 $this->description = $this->json_obj->description;
201
202 $this->participantname = $this->json_obj->name;
203 $this->is_self = $this->json_obj->itsyou;
204
205 include_once './Services/WebServices/ECS/classes/class.ilECSOrganisation.php';
206 $this->org = new ilECSOrganisation();
207 if(is_object($this->json_obj->org))
208 {
209 $this->org->loadFromJson($this->json_obj->org);
210 }
211 return true;
212 }
213}
214?>
getParticipantName()
get participant name
isPublishable()
is publishable (enabled and mid with own cert id)
__construct($json_obj, $a_cid)
Constructor.
getCommunityId()
get community id
getOrganisation()
Get organisation.
getAbbreviation()
get abbreviation of participant
getDescription()
get description
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
Definition: CAS.php:276