Basecoat\Messages::get PHP Method

get() public method

Get currently loaded messages Optionally filter on message type
public get ( String $msg_type = null ) : Array
$msg_type String message type to return (info, warn, error)
return Array list of currently loaded messages
    public function get($msg_type = null)
    {
        if (is_null($msg_type)) {
            if (isset($_SESSION['messages'][$msg_type])) {
                return $_SESSION['messages'][$msg_type];
            } else {
                return array();
            }
        } else {
            return $_SESSION['messages'];
        }
    }