code/libraries/joomlatools/library/user/session/container/message.php
public function get($type, $default = array())
    {
        if(isset($this->_previous[$type]))
        {
            $result = $this->_previous[$type];
            unset($this->_previous[$type]);
        }
        else $result = $default;

        return $result;
    }
public function get($type, $default = array())
    {
        if(isset($this->_previous[$type]))
        {
            $result = $this->_previous[$type];
            unset($this->_previous[$type]);
        }
        else $result = $default;

        return $result;
    }
public function get ( $ type , $ default = array ( ) ) { if ( isset ( $ this -> _previous [ $ type ] ) ) { $ result = $ this -> _previous [ $ type ] ; unset ( $ this -> _previous [ $ type ] ) ; } else $ result = $ default ; return $ result ; }
Get previous flash messages for a given type and flush them from the container

@param string $type    Message category type.
@param array  $default Default value if $type does not exist.
@return array
Get previous flash messages for a given type and flush them from the container