_msg_html .= "

"; if ($this->use_logo === true) { $this->_msg_html .= ""; } $this->_msg_html .= "" . nl2br($input) . "

"; $this->_msg_plain .= "{$input} =================== "; } /** * Function for adding a second level headline. * * @param string $input Input string. * * @return void */ public function appendHeadlineSec(string $input):void { $input = trim($input); $this->_msg_html .= "

" . nl2br($input) . "

"; $this->_msg_plain .= "{$input} ------------------- "; } /** * Function for adding a paragraph. * * @param string $input Input string. * * @return void */ public function appendParagraph(string $input):void { $input = trim($input); $this->_msg_html .= "

" . nl2br($input) . "

"; $this->_msg_plain .= " {$input} "; } /** * Function for adding a button. * * @param string $href Input link. * @param string $input Input text. * * @return void */ public function appendButton(string $href, string $input):void { $input = trim($input); $this->_msg_html .= "" . nl2br($input) . ""; $this->_msg_plain .= " {$input}: {$href} "; } /** * Function for adding an inline link. * * @param string $href Input link. * @param string $input Input text. * * @return void */ public function appendLink(string $href, string $input):void { $input = trim($input); $this->_msg_html .= "" . nl2br($input) . ""; $this->_msg_plain .= "{$input}: {$href}"; } /** * Function for starting an unordered list. * * @return void */ public function startUl():void { $this->_msg_html .= ""; $this->_msg_plain .= PHP_EOL . PHP_EOL; } /** * Function for opening an ordered list. * * @return void */ public function startOl():void { $this->_msg_html .= "
    "; $this->_msg_plain .= PHP_EOL; } /** * Function for ending an ordered list. * * @return void */ public function endOl():void { $this->_msg_html .= "
"; $this->_msg_plain .= PHP_EOL . PHP_EOL; } /** * Function for appending a list item in an unordered list. * * @param string $input Input text. * * @return void */ public function appendLiUl(string $input):void { $input = trim($input); $this->_msg_html .= "
  • {$input}
  • "; $this->_msg_plain .= PHP_EOL . "- {$input}"; } /** * Function for starting a list item in an unordered list. * * @return void */ public function startLiUl():void { $this->_msg_html .= "
  • "; $this->_msg_plain .= PHP_EOL . "- "; } /** * Function for starting a list item in an ordered list. * * @param integer $counter Counter of the list item. * * @return void */ public function startLiOl(int $counter):void { $this->_msg_html .= "
  • "; $this->_msg_plain .= PHP_EOL . "{$counter}) "; } /** * Function for ending a list item. * * @return void */ public function endLi():void { $this->_msg_html .= "
  • "; } /** * Function for horizontal rule. * * @return void */ public function appendHr():void { $this->_msg_html .= "
    "; $this->_msg_plain .= PHP_EOL . "----------" . PHP_EOL; } /** * Function for appending simple text. * * @param string $input Input text. * * @return void */ public function appendInlineText(string $input):void { $input = trim($input); $this->_msg_html .= $input . " "; $this->_msg_plain .= $input . " "; } // Getters /** * Getter for HTML mail. Returns the HTML string embedded in the common template. * * @return string */ public function get_html():string { $output = '
    Message from museum-digital
    '; $output .= trim($this->_msg_html); $output .= '
    '; return trim($output); } /** * Getter for plain text mail. * * @return string */ public function get_plain():string { return wordwrap(trim($this->_msg_plain), 80); } }