mirror of
https://github.com/grocy/grocy.git
synced 2025-08-19 20:11:16 +00:00
Upgraded package php-di/php-di
This commit is contained in:
@@ -3,13 +3,14 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\ApiKeyService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
use Slim\Routing\RouteContext;
|
||||
|
||||
class ApiKeyAuthMiddleware extends AuthMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container, $responseFactory);
|
||||
$this->ApiKeyHeaderName = $this->AppContainer->get('ApiKeyHeaderName');
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\SessionService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ResponseInterface as Response;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
@@ -11,7 +12,7 @@ use Slim\Routing\RouteContext;
|
||||
|
||||
abstract class AuthMiddleware extends BaseMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container);
|
||||
$this->ResponseFactory = $responseFactory;
|
||||
|
@@ -3,6 +3,7 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\ApplicationService;
|
||||
use DI\Container;
|
||||
|
||||
class BaseMiddleware
|
||||
{
|
||||
@@ -10,7 +11,7 @@ class BaseMiddleware
|
||||
|
||||
protected $ApplicationService;
|
||||
|
||||
public function __construct(\DI\Container $container)
|
||||
public function __construct(Container $container)
|
||||
{
|
||||
$this->AppContainer = $container;
|
||||
$this->ApplicationService = ApplicationService::getInstance();
|
||||
|
@@ -3,12 +3,13 @@
|
||||
namespace Grocy\Middleware;
|
||||
|
||||
use Grocy\Services\SessionService;
|
||||
use DI\Container;
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface as Request;
|
||||
|
||||
class SessionAuthMiddleware extends AuthMiddleware
|
||||
{
|
||||
public function __construct(\DI\Container $container, ResponseFactoryInterface $responseFactory)
|
||||
public function __construct(Container $container, ResponseFactoryInterface $responseFactory)
|
||||
{
|
||||
parent::__construct($container, $responseFactory);
|
||||
}
|
||||
|
Reference in New Issue
Block a user