Beispiel #1
0
 /**
  * Throws the errors as the main exception.
  *
  * @param Ethereal $model
  * @param string $joiner
  * @param string $exception_type
  * @param string $message
  * @return Ethereal
  */
 public function throwErrors(Ethereal $model, $joiner = "\n", $exception_type = "main", $message = "")
 {
     if ($model->errors()->count() > 0) {
         $this->throwException(!empty($message) ? $message : 'Validation Errors: ' . implode($joiner, $model->errors()->all()), $exception_type, array('model' => $model));
     }
     return $model;
 }
 /**
  * Defines the prefix for the table.
  * @param array $attr
  */
 public function __construct($attr = array())
 {
     $this->table = mw_prefix() . $this->table;
     parent::__construct($attr);
 }