Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Attributes | List of all members
core_calendar\local\event\value_objects\event_times Class Reference

Class representing event times. More...

Inheritance diagram for core_calendar\local\event\value_objects\event_times:
core_calendar\local\event\value_objects\times_interface

Public Member Functions

 __construct (DateTimeImmutable $start, DateTimeImmutable $end, DateTimeImmutable $sort, DateTimeImmutable $modified)
 Constructor. More...
 
 get_duration ()
 Get the duration (the time between start and end). More...
 
 get_end_time ()
 Get the end time. More...
 
 get_modified_time ()
 Get the modified time. More...
 
 get_sort_time ()
 Get the sort time. More...
 
 get_start_time ()
 Get the start time. More...
 

Protected Attributes

DateTimeImmutable $end
 $end Event end time.
 
DateTimeImmutable $modified
 $modified Time event was last modified.
 
DateTimeImmutable $sort
 $sort Time used to sort events.
 
DateTimeImmutable $start
 $start Event start time.
 

Detailed Description

Class representing event times.

License
http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Constructor & Destructor Documentation

◆ __construct()

core_calendar\local\event\value_objects\event_times::__construct ( DateTimeImmutable  $start,
DateTimeImmutable  $end,
DateTimeImmutable  $sort,
DateTimeImmutable  $modified 
)

Constructor.

Parameters
DateTimeImmutable$startEvent start time.
DateTimeImmutable$endEvent end time.
DateTimeImmutable$sortDate used to sort events.
DateTimeImmutable$modifiedTime event was last updated.

Member Function Documentation

◆ get_duration()

core_calendar\local\event\value_objects\event_times::get_duration ( )

Get the duration (the time between start and end).

Return values
DateInterval

Implements core_calendar\local\event\value_objects\times_interface.

◆ get_end_time()

core_calendar\local\event\value_objects\event_times::get_end_time ( )

Get the end time.

Return values
DateTimeImmutable

Implements core_calendar\local\event\value_objects\times_interface.

◆ get_modified_time()

core_calendar\local\event\value_objects\event_times::get_modified_time ( )

Get the modified time.

Return values
DateTimeImmutable

Implements core_calendar\local\event\value_objects\times_interface.

◆ get_sort_time()

core_calendar\local\event\value_objects\event_times::get_sort_time ( )

Get the sort time.

Return values
DateTimeImmutable

Implements core_calendar\local\event\value_objects\times_interface.

◆ get_start_time()

core_calendar\local\event\value_objects\event_times::get_start_time ( )

Get the start time.

Return values
DateTimeImmutable

Implements core_calendar\local\event\value_objects\times_interface.


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