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


PHP Task::getStatus方法代码示例

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


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

示例1: Event

     $modified = true;
 }
 // is description modified?
 if ($description != $task->getDescription()) {
     // save changes
     $oldDescription = $task->getDescription();
     $task->setDescription($description);
     $task->save();
     // log it
     $logEvent = new Event(array('event_type_id' => 'edit_task_description', 'project_id' => $project->getID(), 'user_1_id' => Session::getUserID(), 'item_1_id' => $task->getID(), 'data_1' => $oldDescription, 'data_2' => $description));
     $logEvent->save();
     // set flag
     $modified = true;
 }
 // is status modified?
 if ($status != $task->getStatus()) {
     // save changes
     $oldStatus = $task->getStatus();
     $task->setStatus($status);
     $task->save();
     // log it
     $logEvent = new Event(array('event_type_id' => 'edit_task_status', 'project_id' => $project->getID(), 'user_1_id' => Session::getUserID(), 'item_1_id' => $task->getID(), 'data_1' => $oldStatus, 'data_2' => $status));
     $logEvent->save();
     // set flag
     $modified = true;
 }
 // is num needed modified?
 if ($numNeeded != $task->getNumNeeded()) {
     // save changes
     $oldNumNeeded = $task->getNumNeeded();
     $task->setNumNeeded($numNeeded);
开发者ID:malimu,项目名称:Pipeline,代码行数:31,代码来源:task.process.php

示例2: foreach

         if (isset($archive_lane->ReplyData)) {
             foreach ($archive_lane->ReplyData as $lane_archive) {
                 foreach ($lane_archive as $archive) {
                     foreach ($archive->Lane->Cards as $card) {
                         if (!in_array($card->ExternalCardID, $external_task_id)) {
                             array_push($external_task_id, $card->ExternalCardID);
                             if ($card->ExternalCardID) {
                                 //getting the idtask from project_task table by sending idproject_task(ExternalCardID)
                                 $do_project_task = new ProjectTask();
                                 $idtask = $do_project_task->getTaskId($card->ExternalCardID);
                                 $do_project_task->free();
                                 echo '<br>' . $card->ExternalCardID;
                                 //Close the task (update the status to 'closed')
                                 if ($idtask) {
                                     $do_task = new Task();
                                     $status = $do_task->getStatus($idtask);
                                     echo $status . ":";
                                     if ($status != 'closed') {
                                         $do_task->updateStatus($idtask, "closed");
                                     }
                                     $do_task->free();
                                 }
                             }
                         }
                     }
                 }
             }
         }
         // }//added for testing
     }
 }
开发者ID:jacquesbagui,项目名称:ofuz,代码行数:31,代码来源:cron_leankitkanban_close_tasks.php

示例3: saveTask

 /**
  * Save or update task
  * @param Task $task
  * @return Task
  */
 public function saveTask(Task $task)
 {
     if (is_null($task->getId())) {
         $query = $this->db->prepare("INSERT INTO tasks (name, parameters, status) VALUES (?, ?, ?)");
         $query->execute([$task->getName(), $task->getParameters(), $task->getStatus()]);
         $task->setId($this->db->lastInsertId());
     } else {
         $query = $this->db->prepare("UPDATE tasks SET name = ?, parameters = ?, status = ? WHERE id = ?");
         $query->execute([$task->getName(), $task->getParameters(), $task->getStatus(), $task->getId()]);
     }
     return $task;
 }
开发者ID:andrazk,项目名称:queue_manager,代码行数:17,代码来源:SqlStorage.php

示例4: run

 /**
  * Run the task.
  *
  * @param string $logfile The log file to use.
  *
  * @return bool
  */
 public function run($logfile)
 {
     $this->task->perform($logfile);
     return Task::STATE_FINISHED === $this->task->getStatus();
 }
开发者ID:aschempp,项目名称:tenside-core,代码行数:12,代码来源:Runner.php


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