- Added CLI support
This commit is contained in:
		
							parent
							
								
									3320dc47c1
								
							
						
					
					
						commit
						163df3f4ba
					
				| @ -38,7 +38,11 @@ class ApplicationStrategy extends Strategy\ApplicationStrategy { | |||||||
| 
 | 
 | ||||||
|             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface |             public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface | ||||||
|             { |             { | ||||||
|                 return $this->throw404($request); |                 if (php_sapi_name() !== 'cli' and ! defined('STDIN'))  { | ||||||
|  |                     return $this->throw404($request); | ||||||
|  |                 } | ||||||
|  | 
 | ||||||
|  |                 return $handler->handle($request);; | ||||||
|             } |             } | ||||||
| 
 | 
 | ||||||
|             public function throw404(ServerRequestInterface $request) : ResponseInterface |             public function throw404(ServerRequestInterface $request) : ResponseInterface | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user