public function save() {
    if ($this->id) {
      return self::update($this->id, $this);
    }
    else {
      $new = self::create($this);
      $this->task_id = $new->task_id;
      return $this;
    }
  }
public function save() {
    if ($this->id) {
      return self::update($this->id, $this);
    }
    else {
      $new = self::create($this);
      $this->task_id = $new->task_id;
      return $this;
    }
  }
public function save ( ) { if ( $ this -> id ) { return self :: update ( $ this -> id , $ this ) ; } else { $ new = self :: create ( $ this ) ; $ this -> task_id = $ new -> task_id ; return $ this ; } }
Creates or updates a task
Creates or updates a task