code/libraries/joomlatools/library/controller/response/response.php
public function getMessages($flush = true)
    {
        $result = $this->_messages;

        if($flush) {
            $this->_messages = array();
        }

        return $result;
    }
public function getMessages($flush = true)
    {
        $result = $this->_messages;

        if($flush) {
            $this->_messages = array();
        }

        return $result;
    }
public function getMessages ( $ flush = true ) { $ result = $ this -> _messages ; if ( $ flush ) { $ this -> _messages = array ( ) ; } return $ result ; }
Get the response messages

@param  boolean $flush   If TRUE flush the messages. Default is TRUE.
@return array
Get the response messages