_title = $title; $this->_message = $message; $this->_type = in_array($type, ['success', 'info', 'warning', 'danger']) ? $type : 'info'; } public function html_main() { echo '
' , !empty($this->_title) ? '' . $this->_title . '
' : '', ' ', $this->_message, $this->additional_alert_content(), '
'; } protected function additional_alert_content() { } }