mirror of
				https://gitlab.com/Chill-Projet/chill-bundles.git
				synced 2025-10-31 09:18:24 +00:00 
			
		
		
		
	Add test routes and controller.
This commit is contained in:
		
				
					committed by
					
						 Marc Ducobu
						Marc Ducobu
					
				
			
			
				
	
			
			
			
						parent
						
							ac58340d60
						
					
				
				
					commit
					845833a211
				
			
							
								
								
									
										32
									
								
								src/Bundle/ChillWopiBundle/src/Controller/Test.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								src/Bundle/ChillWopiBundle/src/Controller/Test.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * For the full copyright and license information, please view | ||||
|  * the LICENSE file that was distributed with this source code. | ||||
|  */ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Chill\WopiBundle\Controller; | ||||
|  | ||||
| use Chill\WopiBundle\Service\OpenStack\OpenStackClientInterface; | ||||
| use Symfony\Component\HttpFoundation\Response; | ||||
|  | ||||
| final class Test | ||||
| { | ||||
|     private OpenStackClientInterface $client; | ||||
|  | ||||
|     public function __construct(OpenStackClientInterface $client) | ||||
|     { | ||||
|         $this->client = $client; | ||||
|  | ||||
|         var_dump($client); | ||||
|     } | ||||
|  | ||||
|     public function __invoke() | ||||
|     { | ||||
|         dump($this->client); | ||||
|  | ||||
|         return new Response('fobar'); | ||||
|     } | ||||
| } | ||||
| @@ -0,0 +1,17 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * For the full copyright and license information, please view | ||||
|  * the LICENSE file that was distributed with this source code. | ||||
|  */ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| use Chill\WopiBundle\Controller\Test; | ||||
| use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator; | ||||
|  | ||||
| return static function (RoutingConfigurator $routes) { | ||||
|     $routes | ||||
|         ->add('testtest', '/test') | ||||
|         ->controller(Test::class); | ||||
| }; | ||||
							
								
								
									
										32
									
								
								src/Bundle/ChillWopiBundle/src/Resources/config/services.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								src/Bundle/ChillWopiBundle/src/Resources/config/services.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,32 @@ | ||||
| <?php | ||||
|  | ||||
| /** | ||||
|  * For the full copyright and license information, please view | ||||
|  * the LICENSE file that was distributed with this source code. | ||||
|  */ | ||||
|  | ||||
| declare(strict_types=1); | ||||
|  | ||||
| namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||||
|  | ||||
| use ChampsLibres\WopiLib\WopiInterface; | ||||
| use ChampsLibres\WopiTestBundle\Service\Wopi; | ||||
|  | ||||
| return static function (ContainerConfigurator $container) { | ||||
|     $services = $container->services(); | ||||
|  | ||||
|     $services | ||||
|         ->defaults() | ||||
|         ->autoconfigure(true) | ||||
|         ->autowire(true); | ||||
|  | ||||
|     $services | ||||
|         ->load('ChampsLibres\\WopiTestBundle\\Service\\', __DIR__ . '/../../Service'); | ||||
|  | ||||
|     $services | ||||
|         ->load('ChampsLibres\\WopiTestBundle\\Controller\\', __DIR__ . '/../../Controller') | ||||
|         ->tag('controller.service_arguments'); | ||||
|  | ||||
|     $services | ||||
|         ->alias(WopiInterface::class, Wopi::class); | ||||
| }; | ||||
		Reference in New Issue
	
	Block a user