예제 #1
0
 /**
  * Mass-assign an associative array to the record.
  *
  * @param array $values The array of values.
  */
 public function setArray($values)
 {
     // If the expansion has already exists, set the values directly.
     if ($this->exists()) {
         parent::setArray($values);
     } else {
         foreach ($values as $k => $v) {
             if (!is_null($this->{$k}) && is_null($v)) {
                 continue;
             }
             $this->setNotEmpty($k, $v);
         }
     }
 }
예제 #2
0
 /**
  * Alias unmodified save (used for testing).
  */
 public function __save()
 {
     parent::save();
 }