public function clear($type = null)
    {
        if (is_null($type)) {
            $_SESSION[$this->key] = [];
        } else {
            unset($_SESSION[$this->key][$type]);
        }

        return $this;
    }
public function clear($type = null)
    {
        if (is_null($type)) {
            $_SESSION[$this->key] = [];
        } else {
            unset($_SESSION[$this->key][$type]);
        }

        return $this;
    }
public function clear ( $ type = null ) { if ( is_null ( $ type ) ) { $ _SESSION [ $ this -> key ] = [ ] ; } else { unset ( $ _SESSION [ $ this -> key ] [ $ type ] ) ; } return $ this ; }
Clears messages from session store.

@param string $type - message type: success, info, warning, error

@return Engine $this
Clears messages from session store .