I would prefer this to have API similar to [Session::flash()](http://api.cakephp.org/3.0/class-Cake.Network.Session.html#_flash) with ability to specify `type`. The `type` can be used as css class in default flash message template or developer can interpret it as needed if using custom element.