public function __construct($message, $code = 500) { if ($this->_template != "") { // feed in the $message into the formatted string template $this->_previousMessage = $message; if (is_array($message)) { /* * if there is more than one piece of information to feed in, * the $message is in array and should use vsprintf to inject */ $this->message = vsprintf($this->_template, $message); } else { // sprintf for single-valued feed in $this->message = sprintf($this->_template, $message); } } parent::__construct($this->message, $code); }
public function __construct($message, $code = 400) { parent::__construct($message, $code); }