• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Schedule类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中Schedule的典型用法代码示例。如果您正苦于以下问题:PHP Schedule类的具体用法?PHP Schedule怎么用?PHP Schedule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了Schedule类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: updateSchedule

 /**
  * Update a specific schedule for a campaign
  * @param string $accessToken - Constant Contact OAuth2 access token
  * @param int $campaignId - Campaign id to be scheduled
  * @param Schedule $schedule - Schedule to retrieve
  * @return Schedule
  */
 public function updateSchedule($accessToken, $campaignId, Schedule $schedule)
 {
     $baseUrl = Config::get('endpoints.base_url') . sprintf(Config::get('endpoints.campaign_schedule'), $campaignId, $schedule->id);
     $url = $this->buildUrl($baseUrl);
     $response = parent::getRestClient()->put($url, parent::getHeaders($accessToken), $schedule->toJson());
     return Schedule::create(json_decode($response->body, true));
 }
开发者ID:CreatrixeNew,项目名称:carparking,代码行数:14,代码来源:CampaignScheduleService.php


示例2: schedule

 public function schedule($cycle, $period, $interval = null)
 {
     $this->schedule = new Schedule();
     $this->schedule->setCycle($cycle);
     $this->schedule->setPeriod($period);
     $this->schedule->setInterval($interval);
 }
开发者ID:ajbdev,项目名称:computus,代码行数:7,代码来源:RepeatableEvent.php


示例3: onReceive

 public function onReceive($server, $fd, $fromId, $data)
 {
     //echo "receive \n";
     $tttt = new Schedule();
     $test = new TestController($server, $fd, $fromId, array());
     $tttt->add($test->test());
 }
开发者ID:learsu,项目名称:php-swoole-framework,代码行数:7,代码来源:testTcpServ.php


示例4: setBusyhours

 public function setBusyhours($value)
 {
     $this->busyHours = $value;
     $schedule = new Schedule();
     $schedule->setBusyHours($value);
     $this->schedule = $schedule->schedule;
 }
开发者ID:consultnn,项目名称:api-client,代码行数:7,代码来源:Company.php


示例5: setup

 public function setup()
 {
     parent::setup();
     $this->scheduleRepository = $this->getMock('IScheduleRepository');
     $this->schedule = new FakeSchedule();
     $this->schedule->SetTimezone('America/Chicago');
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:7,代码来源:ResourceCrossDayRuleTests.php


示例6: onReceive

 public function onReceive($server, $fd, $fromId, $data)
 {
     $tttt = new Schedule();
     $test = new TestController($server, $fd, array());
     $tttt->add($test->test());
     $tttt->run();
     $this->server->send($fd, $data);
 }
开发者ID:learsu,项目名称:php-swoole-framework,代码行数:8,代码来源:testUdpServ.php


示例7: smarty_function_tasklist2xml

/**
 * return the tasklist as an xml document that 
 * would be used by the drdat app on a phone
 */
function smarty_function_tasklist2xml($params, &$smarty)
{
    if (!Check::digits($params['study_id'], $empty = false)) {
        return;
    }
    $s = new Schedule();
    return htmlentities($s->tasklist2xml($params['study_id']));
}
开发者ID:Maharaja1,项目名称:drdata,代码行数:12,代码来源:function.tasklist2xml.php


示例8: ScheduleContainsNoResources

 /**
  * @param Schedule $schedule
  * @param ResourceDto[] $resources
  * @return bool
  */
 private function ScheduleContainsNoResources(Schedule $schedule, $resources)
 {
     foreach ($resources as $resource) {
         if ($resource->GetScheduleId() == $schedule->GetId()) {
             return false;
         }
     }
     return true;
 }
开发者ID:hugutux,项目名称:booked,代码行数:14,代码来源:CalendarFilters.php


示例9: postDeleteshedule

 public function postDeleteshedule()
 {
     $data = Input::only('schedule_id');
     $scObj = new Schedule();
     $update = $scObj->deleteData($data['schedule_id']);
     if ($update) {
         return Response::json(array('status' => '1', $data));
     } else {
         return Response::json(array('status' => '0', $data));
     }
 }
开发者ID:arizawan,项目名称:livetvwithyoutube,代码行数:11,代码来源:RainTvController.php


示例10: smarty_function_schedule

/**
 * grab the schedule for a task in a study
 */
function smarty_function_schedule($params, &$smarty)
{
    if (!Check::digits($params['study_id'])) {
        return;
    }
    if (!Check::digits($params['task_id'])) {
        return;
    }
    $s = new Schedule();
    $smarty->assign('schedule', $s->getone(array('study_id' => $params['study_id'], 'task_id' => $params['task_id'])));
}
开发者ID:Maharaja1,项目名称:drdata,代码行数:14,代码来源:function.schedule.php


示例11: editscheduleAction

 public function editscheduleAction()
 {
     try {
         $this->checkLogin();
         $schedule = new Schedule();
         $schedule->update($this->request->getPost());
         header("Location: " . ROOT_URL . "/admin/finish/");
     } catch (Exception $e) {
         $this->displayErrorView($e->getMessage());
     }
 }
开发者ID:ktanifuji,项目名称:gr3,代码行数:11,代码来源:AdminController.php


示例12: _GetAllRows

 private function _GetAllRows()
 {
     $rows = $this->GetRows();
     $expected = array();
     foreach ($rows as $item) {
         $schedule = new Schedule($item[ColumnNames::SCHEDULE_ID], $item[ColumnNames::SCHEDULE_NAME], $item[ColumnNames::SCHEDULE_DEFAULT], $item[ColumnNames::SCHEDULE_WEEKDAY_START], $item[ColumnNames::SCHEDULE_DAYS_VISIBLE], $item[ColumnNames::TIMEZONE_NAME]);
         $schedule->SetAdminGroupId($item[ColumnNames::SCHEDULE_ADMIN_GROUP_ID]);
         $expected[] = $schedule;
     }
     return $expected;
 }
开发者ID:utn-frm-si,项目名称:booked,代码行数:11,代码来源:FakeSchedules.php


示例13: newSchedule

 /**
  * Creates a new schedule
  *
  * @return Redirect
  * @author Dan Cox
  */
 public function newSchedule()
 {
     $schedule = new Schedule();
     $schedule->setName(Input::get('name'))->setDescription(Input::get('description'))->setUpdatedAt(date('Y-m-d H:i:s'));
     $errors = Validator::make($schedule);
     if (count($errors) > 0) {
         return Redirect::route('page.newSchedule')->withErrors($errors)->withInput()->send();
     }
     DB::save($schedule);
     return Redirect::route('page.schedules')->with('success', 'Successfully created new schedule')->send();
 }
开发者ID:Danzabar,项目名称:schedules,代码行数:17,代码来源:ScheduleController.php


示例14: getScheduleToRoomMapping

 private function getScheduleToRoomMapping()
 {
     $schedule = new Schedule();
     $mapping = array();
     foreach ($schedule->getScheduleToRoomSlugMapping() as $schedule => $slug) {
         try {
             $mapping[$schedule] = new Room($slug);
         } catch (NotFoundException $e) {
             //
         }
     }
     return $mapping;
 }
开发者ID:agnat,项目名称:streaming-website,代码行数:13,代码来源:Relive.php


示例15: indexAction

 public function indexAction()
 {
     try {
         $schedule = new Schedule();
         $is_able_to_register = $schedule->is_in_time('regist', $this->current_time);
         if ($is_able_to_register) {
             $this->showIndexPage($schedule);
         } else {
             $this->showPreIndexPage($schedule);
         }
     } catch (Exception $e) {
         $this->displayErrorView($e->getMessage());
     }
 }
开发者ID:ktanifuji,项目名称:gr3,代码行数:14,代码来源:IndexController.php


示例16: schedule_options

/**
 * Options for dropdown list
 * 
 *
 * @return array
 */
function schedule_options($add_blank = FALSE)
{
    $s = new Schedule();
    $rows = $s->order_by('name')->get();
    $minute = 0;
    if ($add_blank == TRUE) {
        $options[''] = '';
    }
    foreach ($rows as $row) {
        $options[$row->id] = $row->name;
        $minute++;
    }
    return $options;
}
开发者ID:billyriantono,项目名称:ihrmis,代码行数:20,代码来源:options_helper.php


示例17: schedule_controller

function schedule_controller()
{
    global $session, $route, $mysqli, $user;
    $result = false;
    require "Modules/schedule/schedule_model.php";
    $schedule = new Schedule($mysqli, $user->get_timezone($session['userid']));
    if ($route->format == 'html') {
        if ($route->action == "view" && $session['write']) {
            $result = view("Modules/schedule/Views/schedule_view.php", array());
        }
        if ($route->action == 'api') {
            $result = view("Modules/schedule/Views/schedule_api.php", array());
        }
    }
    if ($route->format == 'json') {
        if ($route->action == 'list') {
            if ($session['userid'] > 0 && $session['userid'] && $session['read']) {
                $result = $schedule->get_list($session['userid']);
            }
        } elseif ($route->action == "create") {
            if ($session['userid'] > 0 && $session['write']) {
                $result = $schedule->create($session['userid']);
            }
        } else {
            $scheduleid = (int) get('id');
            if ($schedule->exist($scheduleid)) {
                $scheduleget = $schedule->get($scheduleid);
                // if public or belongs to user
                if ($session['read'] && ($scheduleget['public'] || $session['userid'] > 0 && $scheduleget['userid'] == $session['userid'])) {
                    if ($route->action == "get") {
                        $result = $scheduleget;
                    }
                    if ($route->action == "expression") {
                        $result = $schedule->get_expression($scheduleid);
                    }
                    if ($route->action == "test") {
                        $result = $schedule->test_expression($scheduleid);
                    }
                }
                // if public
                if (isset($session['write']) && $session['write'] && $session['userid'] > 0 && $scheduleget['userid'] == $session['userid']) {
                    if ($route->action == "delete") {
                        $result = $schedule->delete($scheduleid);
                    }
                    if ($route->action == 'set') {
                        $result = $schedule->set_fields($scheduleid, get('fields'));
                    }
                }
            } else {
                $result = array('success' => false, 'message' => 'Schedule does not exist');
            }
        }
    }
    return array('content' => $result);
}
开发者ID:alj56,项目名称:emoncms,代码行数:55,代码来源:schedule_controller.php


示例18: save

 /**
  * Save the user, both in the DB and in the session
  *
  */
 function save(Schedule $schedule, $userID)
 {
     $userID = $this->clean($userID);
     // Remove all the hours of the user
     $query = 'DELETE * FROM ' . self::TABLE_SCHEDULE . ' WHERE userID = ' . $userID;
     $this->getDB()->query($query);
     // Add all the new hours
     foreach ($schedule->getSchedule() as $day => $hours) {
         foreach ($hours as $h) {
             $save = array('userID' => $userID, 'day' => $day, 'hour' => $h);
             $this->getDB()->insert(self::TABLE_SCHEDULE, $save);
         }
     }
 }
开发者ID:shaunwickett13,项目名称:GriffTutor,代码行数:18,代码来源:ScheduleManager.php


示例19: Add

 public function Add(Schedule $schedule, $copyLayoutFromScheduleId)
 {
     $user = $this->repo->LoadById($this->user->UserId);
     if (!$user->IsInRole(RoleLevel::SCHEDULE_ADMIN)) {
         throw new Exception(sprintf('Schedule Add Failed. User %s does not have admin access.', $this->user->UserId));
     }
     foreach ($user->Groups() as $group) {
         if ($group->IsScheduleAdmin) {
             $schedule->SetAdminGroupId($group->GroupId);
             break;
         }
     }
     parent::Add($schedule, $copyLayoutFromScheduleId);
 }
开发者ID:Trideon,项目名称:gigolo,代码行数:14,代码来源:ScheduleAdminScheduleRepository.php


示例20: get_Schedule

 function get_Schedule($id, $ident)
 {
     global $globalDebug;
     // Get schedule here, so it's done only one time
     $Connection = new Connection();
     $dbc = $Connection->db;
     $Spotter = new Spotter($dbc);
     $Schedule = new Schedule($dbc);
     $Translation = new Translation($dbc);
     $operator = $Spotter->getOperator($ident);
     if ($Schedule->checkSchedule($operator) == 0) {
         $operator = $Translation->checkTranslation($ident);
         if ($Schedule->checkSchedule($operator) == 0) {
             $schedule = $Schedule->fetchSchedule($operator);
             if (count($schedule) > 0) {
                 if ($globalDebug) {
                     echo "-> Schedule info for " . $operator . " (" . $ident . ")\n";
                 }
                 $this->all_flights[$id] = array_merge($this->all_flights[$id], array('departure_airport_time' => $schedule['DepartureTime']));
                 $this->all_flights[$id] = array_merge($this->all_flights[$id], array('arrival_airport_time' => $schedule['ArrivalTime']));
                 // FIXME : Check if route schedule = route from DB
                 if ($schedule['DepartureAirportIATA'] != '') {
                     if ($this->all_flights[$id]['departure_airport'] != $Spotter->getAirportIcao($schedule['DepartureAirportIATA'])) {
                         $airport_icao = $Spotter->getAirportIcao($schedule['DepartureAirportIATA']);
                         if ($airport_icao != '') {
                             $this->all_flights[$id]['departure_airport'] = $airport_icao;
                             if ($globalDebug) {
                                 echo "-> Change departure airport to " . $airport_icao . " for " . $ident . "\n";
                             }
                         }
                     }
                 }
                 if ($schedule['ArrivalAirportIATA'] != '') {
                     if ($this->all_flights[$id]['arrival_airport'] != $Spotter->getAirportIcao($schedule['ArrivalAirportIATA'])) {
                         $airport_icao = $Spotter->getAirportIcao($schedule['ArrivalAirportIATA']);
                         if ($airport_icao != '') {
                             $this->all_flights[$id]['arrival_airport'] = $airport_icao;
                             if ($globalDebug) {
                                 echo "-> Change arrival airport to " . $airport_icao . " for " . $ident . "\n";
                             }
                         }
                     }
                 }
                 $Schedule->addSchedule($operator, $this->all_flights[$id]['departure_airport'], $this->all_flights[$id]['departure_airport_time'], $this->all_flights[$id]['arrival_airport'], $this->all_flights[$id]['arrival_airport_time'], $schedule['Source']);
             }
         }
     }
     //$Connection->db = null;
 }
开发者ID:sysrun,项目名称:FlightAirMap,代码行数:49,代码来源:class.SpotterImport.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Scheduler类代码示例发布时间:2022-05-23
下一篇:
PHP ScatterPlot类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap