function register(Application $app) { $app['pipe.environment'] = $app->share(function () use($app) { return new Environment(); }); }