/** * Register a global HTTP request, response and session with the container. * * @param Container $container */ public function register(Container $container) { $container->register(array('Darya\\Http\\Request' => function ($container) { return Request::createFromGlobals($container->resolve('Darya\\Http\\Session')); }, 'Darya\\Http\\Response' => new Response(), 'Darya\\Http\\Session' => new Session\Php())); }