protected function registerRegistry()
    {
        $this->app['registry'] = $this->app->share(function($app)
        {
            $config = $app->config->get('registry', array());

            return new Registry($app['db'], $app['registry.cache'], $config);
        });
    }