Skip to content
This repository has been archived by the owner on Nov 2, 2018. It is now read-only.

Commit

Permalink
Now with the power of Symfony\HttpFoundation
Browse files Browse the repository at this point in the history
  • Loading branch information
hassankhan committed Jan 29, 2014
1 parent 59d9f33 commit 2dd612a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions library/Zepto/Zepto.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
use Pimple;
use Whoops;
use Michelf\MarkdownExtra;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;


class Zepto {

Expand Down Expand Up @@ -82,6 +85,22 @@ function ($container) {
);
$whoops = $this->_configure_error_handler();

$container['request'] = $container->share(
function() {
return Request::createFromGlobals();
}
);

$container['response'] = $container->share(
function() {
return new Response(
'Content',
Response::HTTP_OK,
array('content-type' => 'text/html')
);
}
);

$container['router'] = $container->share(
function () {
return new Router;
Expand Down

0 comments on commit 2dd612a

Please sign in to comment.