コード例 #1
0
 protected function _DoStart()
 {
     if (TaskPump::Pump()->GetTaskHistory()->Count() > 0) {
         $task = TaskPump::Pump()->GetTaskHistory()->Top();
         $tpl_name = '';
         if ($task instanceof \phalanx\views\CustomViewTask) {
             $tpl_name = $task->CustomTemplateName();
         } else {
             $loader = $this->template_loader;
             $tpl_name = $loader(get_class($task));
         }
         $data = $this->GetTaskData($task);
         $view = new View($tpl_name);
         $keys = $data->AllKeys();
         foreach ($keys as $key) {
             $view->{$key} = $data->{$key};
         }
         $view->Render();
     }
 }