ILIAS  Release_4_2_x_branch Revision 61807
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSEContentDetails Class Reference

Presentation of ecs content details (http://...campusconnect/courselinks/id/details) More...

+ Collaboration diagram for ilECSEContentDetails:

Public Member Functions

 __construct ()
 Constructor.
 getSenders ()
 Get senders.
 getFirstSender ()
 get first sender
 getReceivers ()
 Get recievers.
 getReceiverInfo ()
 Get receiver info.
 getUrl ()
 Get url.
 getOwner ()
 loadFromJson ($json)
 Load from JSON object.

Data Fields

 $senders = array()
 $receivers = array()
 $url = array()
 $content_type = array()
 $owner = 0

Private Attributes

 $receiver_info = array()

Detailed Description

Presentation of ecs content details (http://...campusconnect/courselinks/id/details)

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

ilECSEContentDetails::__construct ( )

Constructor.

Definition at line 47 of file class.ilECSEContentDetails.php.

{
}

Member Function Documentation

ilECSEContentDetails::getFirstSender ( )

get first sender

Definition at line 64 of file class.ilECSEContentDetails.php.

{
return isset($this->senders[0]) ? $this->senders[0] : 0;
}
ilECSEContentDetails::getOwner ( )

Definition at line 96 of file class.ilECSEContentDetails.php.

References $owner.

{
return (int) $this->owner;
}
ilECSEContentDetails::getReceiverInfo ( )

Get receiver info.

Returns
array

Definition at line 82 of file class.ilECSEContentDetails.php.

References $receiver_info.

{
return (array) $this->receiver_info;
}
ilECSEContentDetails::getReceivers ( )

Get recievers.

Returns
<type>

Definition at line 73 of file class.ilECSEContentDetails.php.

References $receivers.

Referenced by ilECSTaskScheduler\handleUpdate(), and loadFromJson().

{
return (array) $this->receivers;
}

+ Here is the caller graph for this function:

ilECSEContentDetails::getSenders ( )

Get senders.

Returns
array

Definition at line 56 of file class.ilECSEContentDetails.php.

References $senders.

{
return (array) $this->senders;
}
ilECSEContentDetails::getUrl ( )

Get url.

Returns
string

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

References $url.

{
return $this->url;
}
ilECSEContentDetails::loadFromJson (   $json)

Load from JSON object.

public

Parameters
objectJSON object
Exceptions
ilECSReaderException

Definition at line 109 of file class.ilECSEContentDetails.php.

References $ilLog, and getReceivers().

{
global $ilLog;
if(!is_object($json))
{
include_once('./Services/WebServices/ECS/classes/class.ilECSReaderException.php');
$ilLog->write(__METHOD__.': Cannot load from JSON. No object given.');
throw new ilECSReaderException('Cannot parse ECS content details.');
}
foreach((array) $json->senders as $sender)
{
$this->senders[] = $sender->mid;
}
foreach((array) $json->receivers as $receiver)
{
$this->receivers[] = $receiver->mid;
}
// Collect in one array
for($i = 0; $i < count($this->getReceivers()); ++$i)
{
$this->receiver_info[$this->sender[$i]] = $this->receivers[$i];
}
if(is_object($json->owner))
{
$this->owner = (int) $json->owner->pid;
}
$this->url = $json->url;
$this->content_type = $json->content_type;
return true;
}

+ Here is the call graph for this function:

Field Documentation

ilECSEContentDetails::$content_type = array()

Definition at line 38 of file class.ilECSEContentDetails.php.

ilECSEContentDetails::$owner = 0

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

Referenced by getOwner().

ilECSEContentDetails::$receiver_info = array()
private

Definition at line 41 of file class.ilECSEContentDetails.php.

Referenced by getReceiverInfo().

ilECSEContentDetails::$receivers = array()

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

Referenced by getReceivers().

ilECSEContentDetails::$senders = array()

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

Referenced by getSenders().

ilECSEContentDetails::$url = array()

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

Referenced by getUrl().


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