當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。