22 lines
		
	
	
		
			871 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			22 lines
		
	
	
		
			871 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| use Lean\ApplicationStrategy\{ ThrowableHandler, ThrowableHandlerInterface, NotFoundDecoratorInterface, NotFoundDecorator, MethodNotAllowedInterface,  };
 | |
| use function DI\autowire, DI\create, DI\get;
 | |
| 
 | |
| use Psr\Http\Message\ServerRequestInterface;
 | |
| 
 | |
| use Laminas\{ Diactoros\ServerRequestFactory, HttpHandlerRunner\Emitter\EmitterInterface, HttpHandlerRunner\Emitter\SapiEmitter };
 | |
| 
 | |
| return [
 | |
|     ServerRequestInterface::class => function ($c) {
 | |
|         return ServerRequestFactory::fromGlobals(
 | |
|             $_SERVER, $_GET, $_POST, $_COOKIE, $_FILES
 | |
|         );
 | |
|     },
 | |
| 
 | |
|     EmitterInterface::class => create(SapiEmitter::class),
 | |
|     ThrowableHandlerInterface::class => autowire(ThrowableHandler::class),
 | |
|     NotFoundDecoratorInterface::class => autowire(NotFoundDecorator::class),
 | |
|     # MethodNotAllowedInterface::class => autowire(MethodNotAllowedDecorator::class),
 | |
| ];
 |