Commit c964e7da authored by Mat's avatar Mat

crée un nouveeau Api2Bundle

parent 6959fb4e
......@@ -26,6 +26,7 @@ class AppKernel extends Kernel
new Lexik\Bundle\JWTAuthenticationBundle\LexikJWTAuthenticationBundle(),
new FOS\RestBundle\FOSRestBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new Api2Bundle\Api2Bundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
......@@ -6,6 +6,7 @@ imports:
- { resource: "@AssoBundle/Resources/config/services.yml" }
- { resource: "@APIBundle/Resources/config/services.yml" }
- { resource: "@SocketBundle/Resources/config/services.yml" }
- { resource: "@Api2Bundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......
api2:
resource: "@Api2Bundle/Controller/"
type: annotation
prefix: /API/v2
socket:
resource: "@SocketBundle/Controller/"
type: annotation
......
......@@ -7,7 +7,8 @@
"TechnoBundle\\": "src/TechnoBundle",
"AssoBundle\\": "src/AssoBundle",
"APIBundle\\": "src/APIBundle",
"SocketBundle\\": "src/SocketBundle"
"SocketBundle\\": "src/SocketBundle",
"Api2Bundle\\": "src/Api2Bundle"
},
"classmap": [
"app/AppKernel.php",
......
<?php
namespace Api2Bundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class Api2Bundle extends Bundle
{
}
<?php
namespace Api2Bundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DefaultController extends Controller
{
/**
* @Route("/")
*/
public function indexAction()
{
return $this->render('Api2Bundle:Default:index.html.twig');
}
}
services:
# api2.example:
# class: Api2Bundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
File mode changed from 100644 to 100755
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment