class ActiveHoursDates in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_user/src/ActiveHoursDates.php \Drupal\sms_user\ActiveHoursDates
- 2.1.x modules/sms_user/src/ActiveHoursDates.php \Drupal\sms_user\ActiveHoursDates
Define a start and end date container for DrupalDateTime.
This class is similar to \DatePeriod, but without an interval.
Hierarchy
- class \Drupal\sms_user\ActiveHoursDates
Expanded class hierarchy of ActiveHoursDates
File
- modules/
sms_user/ src/ ActiveHoursDates.php, line 12
Namespace
Drupal\sms_userView source
class ActiveHoursDates {
/**
* The start date.
*
* @var \Drupal\Core\Datetime\DrupalDateTime
*/
protected $start;
/**
* The end date.
*
* @var \Drupal\Core\Datetime\DrupalDateTime
*/
protected $end;
/**
* Construct a new ActiveHoursDates object.
*
* @param \Drupal\Core\Datetime\DrupalDateTime $start
* The start date.
* @param \Drupal\Core\Datetime\DrupalDateTime $end
* The end date.
*/
public function __construct(DrupalDateTime $start, DrupalDateTime $end) {
$this->start = $start;
$this->end = $end;
}
/**
* Get the start date.
*
* @return \Drupal\Core\Datetime\DrupalDateTime
* The start date.
*/
public function getStartDate() {
return $this->start;
}
/**
* Get the end date.
*
* @return \Drupal\Core\Datetime\DrupalDateTime
* The end date.
*/
public function getEndDate() {
return $this->end;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ActiveHoursDates:: |
protected | property | The end date. | |
ActiveHoursDates:: |
protected | property | The start date. | |
ActiveHoursDates:: |
public | function | Get the end date. | |
ActiveHoursDates:: |
public | function | Get the start date. | |
ActiveHoursDates:: |
public | function | Construct a new ActiveHoursDates object. |