public function setMessage($messages, $severity = 'info', $once = false)
    {
        if (!empty($messages)) {
            foreach (gplcart_array_flatten((array) $messages) as $message) {
                if ($once) {
                    $this->session->setMessage($message, $severity);
                } else {
                    $this->data['_messages'][$severity][] = $message;
                }
            }
        }
    }
public function setMessage($messages, $severity = 'info', $once = false)
    {
        if (!empty($messages)) {
            foreach (gplcart_array_flatten((array) $messages) as $message) {
                if ($once) {
                    $this->session->setMessage($message, $severity);
                } else {
                    $this->data['_messages'][$severity][] = $message;
                }
            }
        }
    }
public function setMessage ( $ messages , $ severity = 'info' , $ once = false ) { if ( ! empty ( $ messages ) ) { foreach ( gplcart_array_flatten ( ( array ) $ messages ) as $ message ) { if ( $ once ) { $ this -> session -> setMessage ( $ message , $ severity ) ; } else { $ this -> data [ '_messages' ] [ $ severity ] [ ] = $ message ; } } } }
Sets a message or an array of messages
@param string|array $messages
@param string $severity
@param bool $once
Sets a message or an array of messages