Example #1
0
 /**
  * Save all override
  */
 public function saveAll($data = null, $options = array())
 {
     $data = $this->_cleanData($data);
     $this->create();
     if (parent::saveAll($data, $options)) {
         return true;
     } else {
         throw new Exception(ZuhaInflector::invalidate($this->invalidFields()));
     }
 }
Example #2
0
 /**
  * Save All
  * 
  * @param array $data
  * @param array $options
  * @return array
  */
 public function saveAll($data = null, $options = array())
 {
     $data = $this->cleanInputData($data);
     // this has to be here (don't try putting it in beforeValidate() and beforeSave() again)
     if (parent::saveAll($data, $options)) {
         return true;
     } else {
         throw new Exception(ZuhaInflector::invalidate($this->invalidFields()));
     }
 }