本文整理汇总了PHP中Schedule类的典型用法代码示例。如果您正苦于以下问题:PHP Schedule类的具体用法?PHP Schedule怎么用?PHP Schedule使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Schedule类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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));
}
示例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);
}
示例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());
}
示例4: setBusyhours
public function setBusyhours($value)
{
$this->busyHours = $value;
$schedule = new Schedule();
$schedule->setBusyHours($value);
$this->schedule = $schedule->schedule;
}
示例5: setup
public function setup()
{
parent::setup();
$this->scheduleRepository = $this->getMock('IScheduleRepository');
$this->schedule = new FakeSchedule();
$this->schedule->SetTimezone('America/Chicago');
}
示例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);
}
示例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']));
}
示例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;
}
示例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));
}
}
示例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'])));
}
示例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());
}
}
示例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;
}
示例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();
}
示例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;
}
示例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());
}
}