本文整理匯總了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;
}