public function register(Application $app) { $app['randomgenerator'] = $app->share(function () { return new Generator(); }); }