LTI Integration Library 5.1.4
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 (?int $startDateTime, ?int $endDateTime)
 Class constructor.
 
object toJsonldObject ()
 Generate the JSON-LD object representation of the time period.
 
object toJsonObject ()
 Generate the JSON object representation of the image.
 

Static Public Member Functions

static TimePeriod null fromJsonObject (object $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

Constructor & Destructor Documentation

◆ __construct()

__construct ( ?int $startDateTime,
?int $endDateTime )

Class constructor.

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

Member Function Documentation

◆ fromJsonObject()

static TimePeriod null fromJsonObject ( object $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

◆ toJsonldObject()

object toJsonldObject ( )

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

Returns
object JSON object

References Util\valToString().

◆ toJsonObject()

object toJsonObject ( )

Generate the JSON object representation of the image.

Returns
object JSON object