ILIAS  Release_4_1_x_branch Revision 61804
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilECSTimePlace Class Reference

Representation of ECS EContent Time Place. More...

+ Collaboration diagram for ilECSTimePlace:

Public Member Functions

 __construct ()
 Constructor.
 loadFromJson ($a_json)
 load from json
 setBegin ($a_begin)
 set begin
 getBegin ()
 get begin
 getUTBegin ()
 get begin as unix time
 setEnd ($a_end)
 set end
 getEnd ()
 get end
 getUTEnd ()
 get end as unix time
 setRoom ($a_room)
 set room
 getRoom ()
 get room
 setCycle ($a_cycle)
 set cycle
 getCycle ()
 get cycle

Data Fields

 $room = ''
 $begin = ''
 $end = ''
 $cycle = ''

Detailed Description

Representation of ECS EContent Time Place.

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

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

Constructor & Destructor Documentation

ilECSTimePlace::__construct ( )

Constructor.

public

Parameters

Definition at line 48 of file class.ilECSTimePlace.php.

{
}

Member Function Documentation

ilECSTimePlace::getBegin ( )

get begin

public

Definition at line 102 of file class.ilECSTimePlace.php.

References $begin.

{
return $this->begin;
}
ilECSTimePlace::getCycle ( )

get cycle

public

Parameters

Definition at line 210 of file class.ilECSTimePlace.php.

References $cycle.

{
return $this->cycle;
}
ilECSTimePlace::getEnd ( )

get end

public

Definition at line 147 of file class.ilECSTimePlace.php.

References $end.

{
return $this->end;
}
ilECSTimePlace::getRoom ( )

get room

public

Definition at line 186 of file class.ilECSTimePlace.php.

References $room.

{
return $this->room;
}
ilECSTimePlace::getUTBegin ( )

get begin as unix time

public

Definition at line 113 of file class.ilECSTimePlace.php.

{
include_once('Date.php');
$date = new Date();
$date->setDate($this->begin);
return $date->getDate(DATE_FORMAT_UNIXTIME);
}
ilECSTimePlace::getUTEnd ( )

get end as unix time

public

Definition at line 158 of file class.ilECSTimePlace.php.

{
include_once('Date.php');
$date = new Date();
$date->setDate($this->end);
return $date->getDate(DATE_FORMAT_UNIXTIME);
}
ilECSTimePlace::loadFromJson (   $a_json)

load from json

public

Parameters
objectjson representation
Exceptions
ilECSReaderException

Definition at line 60 of file class.ilECSTimePlace.php.

References $ilLog.

{
global $ilLog;
if(!is_object($a_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 ECSContent.');
}
$this->room = $a_json->room;
$this->begin = $a_json->begin;
$this->end = $a_json->end;
$this->cycle = $a_json->cycle;
$this->day = $a_json->day;
}
ilECSTimePlace::setBegin (   $a_begin)

set begin

public

Definition at line 84 of file class.ilECSTimePlace.php.

{
// is it unix time ?
if(is_numeric($a_begin) and $a_begin)
{
$this->begin = date('c',$a_begin);
}
else
{
$this->begin = $a_begin;
}
}
ilECSTimePlace::setCycle (   $a_cycle)

set cycle

public

Parameters

Definition at line 198 of file class.ilECSTimePlace.php.

{
$this->cycle = $a_cycle;
}
ilECSTimePlace::setEnd (   $a_end)

set end

public

Parameters
stringend

Definition at line 129 of file class.ilECSTimePlace.php.

{
// is it unix time ?
if(is_numeric($a_end) and $a_end)
{
$this->end = date('c',$a_end);
}
else
{
$this->end = $a_end;
}
}
ilECSTimePlace::setRoom (   $a_room)

set room

public

Parameters
stringroom

Definition at line 175 of file class.ilECSTimePlace.php.

{
$this->room = $a_room;
}

Field Documentation

ilECSTimePlace::$begin = ''

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

Referenced by getBegin().

ilECSTimePlace::$cycle = ''

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

Referenced by getCycle().

ilECSTimePlace::$end = ''

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

Referenced by getEnd().

ilECSTimePlace::$room = ''

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

Referenced by getRoom().


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