Exemplo n.º 1
0
 public function createTask(Task $task)
 {
     $task->setOwnerId(App::getUserId());
     $task->setCreateDate(date(Defines::SQL_DATE_TIME_FORMAT));
     $this->db->insert('tasks', $task->toArray());
     return $this->db->getLastInsertId();
 }