Skip to content

Commit

Permalink
Add maintenance middleware in provider
Browse files Browse the repository at this point in the history
  • Loading branch information
nguereza-tony committed Nov 20, 2023
1 parent 4e6cc29 commit da9b527
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Service/Provider/BaseServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
use Platine\Framework\Http\Emitter\ResponseEmitter;
use Platine\Framework\Http\Maintenance\Driver\FileMaintenanceDriver;
use Platine\Framework\Http\Maintenance\MaintenanceDriverInterface;
use Platine\Framework\Http\Middleware\MaintenanceMiddleware;
use Platine\Framework\Service\ServiceProvider;
use Platine\Http\Handler\MiddlewareResolver;
use Platine\Http\Handler\MiddlewareResolverInterface;
Expand Down Expand Up @@ -85,6 +86,7 @@ public function register(): void
$this->app->share(Router::class);
$this->app->bind(RouteCollectionInterface::class, RouteCollection::class);
$this->app->bind(MiddlewareResolverInterface::class, MiddlewareResolver::class);
$this->app->bind(MaintenanceMiddleware::class);
$this->app->bind(MaintenanceDriverInterface::class, FileMaintenanceDriver::class);
$this->app->bind(EmitterInterface::class, function (ContainerInterface $app) {
return new ResponseEmitter(
Expand Down

0 comments on commit da9b527

Please sign in to comment.