ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 $pid;
38  protected $mid;
39  protected $email;
40  protected $certid;
41  protected $dns;
42  protected $description;
43  protected $participantname;
44  protected $is_self;
45 
49  private $logger = null;
50 
58  public function __construct($json_obj, $a_cid)
59  {
60  global $DIC;
61 
62  $this->logger = $DIC->logger()->wsrv();
63 
64  $this->json_obj = $json_obj;
65  $this->cid = $a_cid;
66  $this->read();
67  }
68 
75  public function getCommunityId()
76  {
77  return $this->cid;
78  }
79 
87  public function getMID()
88  {
89  return $this->mid;
90  }
91 
98  public function getEmail()
99  {
100  return $this->email;
101  }
102 
103 
111  public function getDNS()
112  {
113  return $this->dns;
114  }
115 
122  public function getDescription()
123  {
124  return $this->description;
125  }
126 
133  public function getParticipantName()
134  {
135  return $this->participantname;
136  }
137 
144  public function getAbbreviation()
145  {
146  return $this->abr;
147  }
148 
153  public function getPid()
154  {
155  return $this->pid;
156  }
157 
165  public function isPublishable()
166  {
167  return $this->isSelf();
168  }
169 
177  public function isSelf()
178  {
179  return (bool) $this->is_self;
180  }
181 
182 
189  public function isEnabled()
190  {
191  $GLOBALS['ilLog']->write(__METHOD__ . ': Using deprecated call');
192  $GLOBALS['ilLog']->logStack();
193  return false;
194  }
195 
200  public function getOrganisation()
201  {
202  return $this->org;
203  }
204 
211  private function read()
212  {
213  $this->pid = $this->json_obj->pid;
214  $this->mid = $this->json_obj->mid;
215  $this->email = $this->json_obj->email;
216  $this->dns = $this->json_obj->dns;
217  $this->description = $this->json_obj->description;
218 
219  $this->participantname = $this->json_obj->name;
220  $this->is_self = $this->json_obj->itsyou;
221 
222  include_once './Services/WebServices/ECS/classes/class.ilECSOrganisation.php';
223  $this->org = new ilECSOrganisation();
224  if (is_object($this->json_obj->org)) {
225  $this->org->loadFromJson($this->json_obj->org);
226  }
227  return true;
228  }
229 }
isPublishable()
is publishable (enabled and mid with own cert id)
global $DIC
Definition: saml.php:7
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
getAbbreviation()
get abbreviation of participant
getDescription()
get description
getParticipantName()
get participant name
__construct($json_obj, $a_cid)
Constructor.
getCommunityId()
get community id
getOrganisation()
Get organisation.