本文整理汇总了PHP中calendar::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP calendar::__construct方法的具体用法?PHP calendar::__construct怎么用?PHP calendar::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类calendar
的用法示例。
在下文中一共展示了calendar::__construct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $focus_time = null)
{
parent::__construct($room, $focus_time);
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}
示例2: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $course, $start_time = 8, $end_time = 5, $focus_time = null)
{
parent::__construct($room, $focus_time);
$this->course = $course;
if ($start_time > $end_time) {
$this->start_time = $end_time;
$this->end_time = $start_time;
} else {
$this->start_time = $start_time;
$this->end_time = $end_time;
}
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}
示例3: __construct
/**
* Initializes day calendar
*
* @param int $room - id from roomscheduler_rooms table
* @param int $day - UNIX time stamp representing the day wanted
* @param int $start_time - 0 to 23 representing start time of displayed content
* @param int $end_time - 0 to 23 representing end time of displayed content
* @param int $focus_time - focus time of calendar, defaults to time()
*/
public function __construct($room, $day, $course, $start_time = 8, $end_time = 5, $show_toolbar = true, $focus_time = null)
{
parent::__construct($room, $focus_time);
$this->course = $course;
$this->day = $day;
$this->miniCal = $day;
if ($start_time > $end_time) {
$this->start_time = $end_time;
$this->end_time = $start_time;
} else {
$this->start_time = $start_time;
$this->end_time = $end_time;
}
$this->show_toolbar = $show_toolbar;
//Set instance of the calendar
if ($this->count == null) {
$this->count = 0;
} else {
$this->count++;
}
$this->instance = 'calendar_day_' . $this->count;
}