Example #1
0
 /**
  * Insert new row with values from $values.
  * If $ignore_unique_error will be inserted only unique rows. @see Table::Insert()
  * @param $values
  * @param bool|false $ignore_unique_error
  * @return int
  */
 public function Insert($values, $ignore_unique_error = false)
 {
     if ($this->_validate_insert($values)) {
         $this->_before_insert();
         $result = $this->table->Insert($values, $ignore_unique_error);
         $this->_on_insert();
     } else {
         $result = 0;
     }
     return $result;
 }