51 lines
1.1 KiB
PHP
51 lines
1.1 KiB
PHP
<?php /** @noinspection ALL */
|
|
|
|
namespace common\modules\event\models\timetable;
|
|
|
|
use customerapi\models\available\EventInterval;
|
|
|
|
/** @noinspection PhpUnused */
|
|
|
|
|
|
/**
|
|
* Class TimeTableMonthWeek
|
|
* @property EventInterval $interval
|
|
* @property TimeTableMonthDay $monday
|
|
* @property TimeTableMonthDay $tuesday
|
|
* @property TimeTableMonthDay $wednesday
|
|
* @property TimeTableMonthDay $thursday
|
|
* @property TimeTableMonthDay $friday
|
|
* @property TimeTableMonthDay $saturday
|
|
* @property TimeTableMonthDay $sunday
|
|
* @property integer $weekNumber
|
|
*/
|
|
class TimeTableMonthWeek
|
|
{
|
|
|
|
|
|
public $monday;
|
|
public $tuesday;
|
|
public $wednesday;
|
|
public $thursday;
|
|
public $friday;
|
|
public $saturday;
|
|
public $sunday;
|
|
|
|
public $weekNumber;
|
|
|
|
/**Get the week day bay property name
|
|
* @param $weekDay
|
|
* @return mixed
|
|
*/
|
|
public function getWeekDay($weekDay)
|
|
{
|
|
|
|
$days = ['monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday', 'sunday'];
|
|
$days = array_combine($days, $days);
|
|
$objectAttribute = $days[$weekDay];
|
|
/** @var TimeTableMonthDay $day */
|
|
return $this->$objectAttribute;
|
|
}
|
|
|
|
}
|