Пример #1
0
 /**
  * Overload the save method in the db so that we can run validation
  *
  * @todo add error messages to some where.
  * @return boolean
  * @author Justin Palmer
  **/
 public function save()
 {
     self::$db->model = $this;
     $boolean = $this->validate();
     if ($boolean) {
         return self::$db->saveNow();
     }
 }