Beispiel #1
0
		/** 
		 * Adds an error object or exception to the internal error array
		 * @param Exception | string $e
		 * @return void
		 */
		public function add($e) {
			if ($e instanceof ValidationErrorHelper) {
				$this->error = array_merge($e->getList(), $this->error);			
			} else if (is_object($e) && ($e instanceof Exception)) {
				$this->error[] = $e->getMessage();
			} else {
				$this->error[] = $e;
			}
		}
 /**
  * Adds an error object or exception to the internal error array
  * @param Exception | string $e
  * @return void
  */
 public function add($e)
 {
     if ($e instanceof Error) {
         foreach ($e->getList() as $errorString) {
             $this->add($errorString);
         }
     } else {
         if (is_object($e) && $e instanceof Exception) {
             $this->error[] = $e->getMessage();
         } else {
             $this->error[] = $e;
         }
     }
 }