LTI Integration Library 4.10.3
PHP class library for building LTI integrations
 
Loading...
Searching...
No Matches
TimePeriod Class Reference

Class to represent a time period object. More...

Public Member Functions

 __construct ($startDateTime, $endDateTime)
 Class constructor.
 
 toJsonldObject ()
 Generate the JSON-LD object representation of the time period.
 
 toJsonObject ()
 Generate the JSON object representation of the image.
 

Static Public Member Functions

static fromJsonObject ($item)
 Generate a LineItem object from its JSON or JSON-LD representation.
 

Detailed Description

Class to represent a time period object.

Author
Stephen P Vickers steph.nosp@m.en@s.nosp@m.pvsof.nosp@m.twar.nosp@m.eprod.nosp@m.ucts.nosp@m..com
Licence: http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3

Definition at line 12 of file TimePeriod.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $startDateTime,
  $endDateTime 
)

Class constructor.

Parameters
int | null$startDateTimeStart date/time
int | null$endDateTimeEnd date/time

Definition at line 35 of file TimePeriod.php.

Member Function Documentation

◆ fromJsonObject()

static fromJsonObject (   $item)
static

Generate a LineItem object from its JSON or JSON-LD representation.

Parameters
object$itemA JSON or JSON-LD object representing a content-item
Returns
TimePeriod|null The TimePeriod object

Definition at line 84 of file TimePeriod.php.

Referenced by LtiLinkItem\fromJsonObject().

◆ toJsonldObject()

toJsonldObject ( )

Generate the JSON-LD object representation of the time period.

Returns
object JSON object

Definition at line 50 of file TimePeriod.php.

References TimePeriod\toJsonObject().

◆ toJsonObject()

toJsonObject ( )

Generate the JSON object representation of the image.

Returns
object JSON object

Definition at line 60 of file TimePeriod.php.

Referenced by TimePeriod\toJsonldObject().


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