Skip to content

Commit

Permalink
Merge pull request #2221 from akrabat/slim-http
Browse files Browse the repository at this point in the history
Depend on Slim-Http
  • Loading branch information
silentworks authored May 17, 2017
2 parents 7e690d7 + a7362be commit 72eea92
Show file tree
Hide file tree
Showing 32 changed files with 101 additions and 8,468 deletions.
2 changes: 0 additions & 2 deletions Slim/Container.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* with these service keys configured and ready for use:
*
* - settings: an array or instance of \ArrayAccess
* - environment: an instance of \Slim\Interfaces\Http\EnvironmentInterface
* - request: an instance of \Psr\Http\Message\ServerRequestInterface
* - response: an instance of \Psr\Http\Message\ResponseInterface
* - router: an instance of \Slim\Interfaces\RouterInterface
Expand All @@ -32,7 +31,6 @@
* - callableResolver: an instance of \Slim\Interfaces\CallableResolverInterface
*
* @property-read array settings
* @property-read \Slim\Interfaces\Http\EnvironmentInterface environment
* @property-read \Psr\Http\Message\ServerRequestInterface request
* @property-read \Psr\Http\Message\ResponseInterface response
* @property-read \Slim\Interfaces\RouterInterface router
Expand Down
15 changes: 1 addition & 14 deletions Slim/DefaultServicesProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
use Slim\Http\Request;
use Slim\Http\Response;
use Slim\Interfaces\CallableResolverInterface;
use Slim\Interfaces\Http\EnvironmentInterface;
use Slim\Interfaces\InvocationStrategyInterface;
use Slim\Interfaces\RouterInterface;

Expand All @@ -36,18 +35,6 @@ class DefaultServicesProvider
*/
public function register($container)
{
if (!isset($container['environment'])) {
/**
* This service MUST return a shared instance
* of \Slim\Interfaces\Http\EnvironmentInterface.
*
* @return EnvironmentInterface
*/
$container['environment'] = function () {
return new Environment($_SERVER);
};
}

if (!isset($container['request'])) {
/**
* PSR-7 Request object
Expand All @@ -57,7 +44,7 @@ public function register($container)
* @return ServerRequestInterface
*/
$container['request'] = function ($container) {
return Request::createFromEnvironment($container->get('environment'));
return Request::createFromGlobals($_SERVER);
};
}

Expand Down
22 changes: 0 additions & 22 deletions Slim/Http/Body.php

This file was deleted.

195 changes: 0 additions & 195 deletions Slim/Http/Cookies.php

This file was deleted.

52 changes: 0 additions & 52 deletions Slim/Http/Environment.php

This file was deleted.

Loading

0 comments on commit 72eea92

Please sign in to comment.