protected function registerFlash() {
        $container = $this->container;
        $this->container->set('flash', function() use ($container) {
            return new Flash($container->get('session'));
        });
    }