Subversion Repositories oidplus

Rev

Rev 1219 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1219 Rev 1266
Line 40... Line 40...
40
 
40
 
41
        /**
41
        /**
42
         * @param string $message
42
         * @param string $message
43
         * @param string|null $title
43
         * @param string|null $title
44
         */
44
         */
45
        public function __construct(string $message, string $title=null) {
45
        public function __construct(string $message, string $title=null, int $httpStatus=500) {
46
                $this->htmlTitle = $title;
46
                $this->htmlTitle = $title;
47
                if ($title) {
47
                if ($title) {
48
                        $title = strip_tags($title);
48
                        $title = strip_tags($title);
49
                        $title_text = html_to_text($title);
49
                        $title_text = html_to_text($title);
50
                } else {
50
                } else {
Line 52... Line 52...
52
                }
52
                }
53
 
53
 
54
                $this->htmlMessage = $message;
54
                $this->htmlMessage = $message;
55
                $message_text = html_to_text($message);
55
                $message_text = html_to_text($message);
56
 
56
 
57
                parent::__construct($message_text, $title_text);
57
                parent::__construct($message_text, $title_text, $httpStatus);
58
        }
58
        }
59
 
59
 
60
        /**
60
        /**
61
         * @return string
61
         * @return string
62
         */
62
         */