29 lines
556 B
PHP
29 lines
556 B
PHP
<?php
|
|
/*
|
|
Author: Riccardo Di Dato
|
|
Creation Date: 26/gen/2016
|
|
*/
|
|
|
|
class MultimessageException extends CoreException {
|
|
protected $messageList;
|
|
|
|
public function __construct(array $arr){
|
|
$this->messageList = $arr;
|
|
$this->message = $this->getMessageMerged("\n");
|
|
}
|
|
|
|
public function addMessage($msg){
|
|
$this->messageList[]=$msg;
|
|
$this->message = $this->getMessageMerged("\n");
|
|
}
|
|
|
|
public function getMessageList(){
|
|
return $this->messageList;
|
|
}
|
|
|
|
public function getMessageMerged($glue){
|
|
return implode($glue,$this->getMessageList());
|
|
}
|
|
}
|
|
|
|
?>
|