/** * Constructor. */ public function __construct($contents) { if (is_string($contents)) { $contents = ['result' => $contents]; } $this->contents = $contents; parent::__construct(json_encode($contents)); }
public function __construct($message = "", $code = 0, \Exception $previous = null) { parent::__construct($message, $code, $previous); }
/** * * @param string $name * @param string $message * @param int $code * @param Exception $innerException */ public function __construct($name, $message = null, $code = null, Exception $innerException = null) { parent::__construct($message, $code, $innerException); $this->name = (string) $name; }