예제 #1
0
파일: goal.php 프로젝트: rezachess/Planning
 public function checkOverlap($task = null)
 {
     if ($task == null && $this->task == null) {
         throw new Task_Not_Found();
     }
     if ($task == null) {
         $task = $this->task;
     }
     $goal = new Goal();
     $goal->where(array("start <=" => $this->start, "end >=" => $this->end))->get_by_related($task);
     if ($goal->exists()) {
         throw new Goal_Overlap();
     }
 }