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