summaryrefslogtreecommitdiff
path: root/src/Http
diff options
context:
space:
mode:
authorIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
committerIgor Scheller <igor.scheller@igorshp.de>2018-09-02 02:09:56 +0200
commit9e217d87c095170460a8580d5215ddf7cbe639f4 (patch)
tree3b426fe52e70ef0f1395edcb354f1be4788ca329 /src/Http
parentac48332166ce28fcb1a2fc130c7f5adbc760e42d (diff)
Template refactoring to use twig
Diffstat (limited to 'src/Http')
-rw-r--r--src/Http/RequestServiceProvider.php3
-rw-r--r--src/Http/ResponseServiceProvider.php3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/Http/RequestServiceProvider.php b/src/Http/RequestServiceProvider.php
index 077e9ecc..1bcdf852 100644
--- a/src/Http/RequestServiceProvider.php
+++ b/src/Http/RequestServiceProvider.php
@@ -3,12 +3,15 @@
namespace Engelsystem\Http;
use Engelsystem\Container\ServiceProvider;
+use Symfony\Component\HttpFoundation\Request as SymfonyRequest;
class RequestServiceProvider extends ServiceProvider
{
public function register()
{
$request = $this->app->call([Request::class, 'createFromGlobals']);
+ $this->app->instance(Request::class, $request);
+ $this->app->instance(SymfonyRequest::class, $request);
$this->app->instance('request', $request);
}
}
diff --git a/src/Http/ResponseServiceProvider.php b/src/Http/ResponseServiceProvider.php
index f0d238ef..c1489f06 100644
--- a/src/Http/ResponseServiceProvider.php
+++ b/src/Http/ResponseServiceProvider.php
@@ -3,12 +3,15 @@
namespace Engelsystem\Http;
use Engelsystem\Container\ServiceProvider;
+use Symfony\Component\HttpFoundation\Response as SymfonyResponse;
class ResponseServiceProvider extends ServiceProvider
{
public function register()
{
$response = $this->app->make(Response::class);
+ $this->app->instance(Response::class, $response);
+ $this->app->instance(SymfonyResponse::class, $response);
$this->app->instance('response', $response);
}
}