Here's a simple settings router. the createOrUpdate method lives in the model, and by default all models will return true on save or false if save went wrong.
20 lines
349 B
PHP
20 lines
349 B
PHP
<?php
|
|
|
|
namespace Sudzy;
|
|
|
|
class ValidationException extends \Exception
|
|
{
|
|
protected $_validationErrors;
|
|
|
|
public function __construct($errs)
|
|
{
|
|
$this->_validationErrors = $errs;
|
|
parent::__construct(implode("\n", $errs));
|
|
}
|
|
|
|
public function getValidationErrors()
|
|
{
|
|
return $this->_validationErrors;
|
|
}
|
|
}
|