当前位置: 首页>>代码示例>>PHP>>正文


PHP Schedule::isScheduleEmptyInRange方法代码示例

本文整理汇总了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;
     }
 }
开发者ID:romansavrulin,项目名称:Airtime,代码行数:23,代码来源:SchedulerTests.php

示例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();
开发者ID:romansavrulin,项目名称:Airtime,代码行数:31,代码来源:airtime-schedule-insert.php


注:本文中的Schedule::isScheduleEmptyInRange方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。