本文整理汇总了PHP中Schedule::isScheduleEmptyInRange方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::isScheduleEmptyInRange方法的具体用法?PHP Schedule::isScheduleEmptyInRange怎么用?PHP Schedule::isScheduleEmptyInRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::isScheduleEmptyInRange方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testIsScheduleEmptyInRange
function testIsScheduleEmptyInRange()
{
$i = new ScheduleGroup();
$this->groupIdCreated = $i->add('2011-10-10 01:30:23', $this->storedFile->getId());
if (PEAR::isError($this->groupIdCreated)) {
$this->fail($this->groupIdCreated->getMessage());
return;
}
if (Schedule::isScheduleEmptyInRange('2011-10-10 01:30:23', '00:00:12.555')) {
$this->fail("Reporting empty schedule when it isnt.");
return;
}
// echo "groupid: ".$this->groupIdCreated."\n";
$success = $i->remove();
if ($success === false) {
$this->fail("Failed to delete schedule group.");
return;
}
if (!Schedule::isScheduleEmptyInRange('2011-10-10 01:30:23', '00:00:12.555')) {
$this->fail("Reporting booked schedule when it isnt.");
return;
}
}
示例2: var_dump
if (PEAR::isError($mediaFile)) {
var_dump($mediaFile);
exit;
}
}
$pl->addAudioClip($mediaFile->getId());
echo "done.\n";
//$pl2 = Playlist::findPlaylistByName("pypo_playlist_test");
//var_dump($pl2);
// Get current time
// In the format YYYY-MM-DD HH:MM:SS.nnnnnn
$startTime = date("Y-m-d H:i:s");
$endTime = date("Y-m-d H:i:s", time() + 60 * 60);
echo "Removing everything from the scheduler between {$startTime} and {$endTime}...";
// Check for succces
$scheduleClear = Schedule::isScheduleEmptyInRange($startTime, "01:00:00");
if (!$scheduleClear) {
echo "\nERROR: Schedule could not be cleared.\n\n";
var_dump(Schedule::GetItems($startTime, $endTime));
exit;
}
echo "done.\n";
// Schedule the playlist for two minutes from now
echo "Scheduling new playlist...\n";
//$playTime = date("Y-m-d H:i:s", time()+(60*$minutesFromNow));
$playTime = date("Y-m-d H:i:s", time() + $secondsFromNow);
//$scheduleGroup = new ScheduleGroup();
//$scheduleGroup->add($playTime, null, $pl->getId());
//$show = new ShowInstance($showInstanceId);
//$show->scheduleShow(array($pl->getId()));
//$show->setShowStart();