ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSCommunity Class Reference
+ Collaboration diagram for ilECSCommunity:

Public Member Functions

 __construct ($json_obj)
 Constructor.
 getTitle ()
 get title
 getDescription ()
 getDescription
 getParticipants ()
 get participants
 getMids ()
 Get array of mids of all participants.
 getOwnId ()
 Get own mid of community.
 getId ()
 get id

Protected Attributes

 $json_obj = null
 $title = ''
 $description = ''
 $id = 0
 $participants = array()
 $position = 0

Private Member Functions

 read ()
 Read community entries and participants.

Detailed Description

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 32 of file class.ilECSCommunity.php.

Constructor & Destructor Documentation

ilECSCommunity::__construct (   $json_obj)

Constructor.

public

Parameters
objectjson object

Definition at line 49 of file class.ilECSCommunity.php.

References $json_obj, and read().

{
$this->json_obj = $json_obj;
$this->read();
}

+ Here is the call graph for this function:

Member Function Documentation

ilECSCommunity::getDescription ( )

getDescription

public

Definition at line 72 of file class.ilECSCommunity.php.

References $description.

{
}
ilECSCommunity::getId ( )

get id

public

Definition at line 123 of file class.ilECSCommunity.php.

References $id.

Referenced by read().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilECSCommunity::getMids ( )

Get array of mids of all participants.

Definition at line 91 of file class.ilECSCommunity.php.

References getParticipants().

{
$mids = array();
foreach($this->getParticipants() as $part)
{
$mids[] = $part->getMID();
}
return $mids;
}

+ Here is the call graph for this function:

ilECSCommunity::getOwnId ( )

Get own mid of community.

Definition at line 104 of file class.ilECSCommunity.php.

References getParticipants().

{
foreach($this->getParticipants() as $part)
{
if($part->isSelf())
{
return $part->getMID();
}
}
return 0;
}

+ Here is the call graph for this function:

ilECSCommunity::getParticipants ( )

get participants

public

Definition at line 83 of file class.ilECSCommunity.php.

Referenced by getMids(), and getOwnId().

{
return $this->participants ? $this->participants : array();
}

+ Here is the caller graph for this function:

ilECSCommunity::getTitle ( )

get title

public

Definition at line 61 of file class.ilECSCommunity.php.

References $title.

{
return $this->title;
}
ilECSCommunity::read ( )
private

Read community entries and participants.

private

Definition at line 135 of file class.ilECSCommunity.php.

References getId().

Referenced by __construct().

{
$this->title = $this->json_obj->community->name;
$this->description = $this->json_obj->community->description;
$this->id = $this->json_obj->community->cid;
foreach($this->json_obj->participants as $participant)
{
include_once('./Services/WebServices/ECS/classes/class.ilECSParticipant.php');
$this->participants[] = new ilECSParticipant($participant,$this->getId());
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilECSCommunity::$description = ''
protected

Definition at line 36 of file class.ilECSCommunity.php.

Referenced by getDescription().

ilECSCommunity::$id = 0
protected

Definition at line 37 of file class.ilECSCommunity.php.

Referenced by getId().

ilECSCommunity::$json_obj = null
protected

Definition at line 34 of file class.ilECSCommunity.php.

Referenced by __construct().

ilECSCommunity::$participants = array()
protected

Definition at line 39 of file class.ilECSCommunity.php.

ilECSCommunity::$position = 0
protected

Definition at line 40 of file class.ilECSCommunity.php.

ilECSCommunity::$title = ''
protected

Definition at line 35 of file class.ilECSCommunity.php.

Referenced by getTitle().


The documentation for this class was generated from the following file: