PMA\libraries\Message::setMessage PHP Method

setMessage() public method

set raw message (overrides string)
public setMessage ( string $message, boolean $sanitize = false ) : void
$message string A localized string
$sanitize boolean Whether to sanitize $message or not
return void
    public function setMessage($message, $sanitize = false)
    {
        if ($sanitize) {
            $message = Message::sanitize($message);
        }
        $this->message = $message;
    }

Usage Example

Example #1
0
 /**
  * get Message with customized content
  *
  * shorthand for getting a customized message
  *
  * @param string  $message A localized string
  * @param integer $type    A numeric representation of the type of message
  *
  * @return Message
  * @static
  */
 public static function raw($message, $type = Message::NOTICE)
 {
     $r = new Message('', $type);
     $r->setMessage($message);
     $r->setBBCode(false);
     return $r;
 }