public function getFlashed($clear = true)
    {
        $messages = $this->core->session()->get(static::SESSION_FLASH_KEY, []);

        if ($clear) {
            $this->core->session()->remove(static::SESSION_FLASH_KEY);
        }

        return $messages;
    }