Commit f81270c1 authored by Mat's avatar Mat

WEBSOCKET avec Khun, création nouveau WebsocketBundle

parent 971d4bb1
...@@ -22,6 +22,7 @@ class AppKernel extends Kernel ...@@ -22,6 +22,7 @@ class AppKernel extends Kernel
new JMS\SerializerBundle\JMSSerializerBundle(), new JMS\SerializerBundle\JMSSerializerBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(), new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new FOS\UserBundle\FOSUserBundle(), new FOS\UserBundle\FOSUserBundle(),
new SocketBundle\SocketBundle(),
]; ];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) { if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
......
...@@ -5,6 +5,7 @@ imports: ...@@ -5,6 +5,7 @@ imports:
- { resource: "@TechnoBundle/Resources/config/services.yml" } - { resource: "@TechnoBundle/Resources/config/services.yml" }
- { resource: "@AssoBundle/Resources/config/services.yml" } - { resource: "@AssoBundle/Resources/config/services.yml" }
- { resource: "@APIBundle/Resources/config/services.yml" } - { resource: "@APIBundle/Resources/config/services.yml" }
- { resource: "@SocketBundle/Resources/config/services.yml" }
# Put parameters here that don't need to change on each machine where the app is deployed # 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 # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
......
socket:
resource: "@SocketBundle/Controller/"
type: annotation
prefix: /socket
fos_js_routing: fos_js_routing:
resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml" resource: "@FOSJsRoutingBundle/Resources/config/routing/routing.xml"
......
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
"psr-4": { "psr-4": {
"TechnoBundle\\": "src/TechnoBundle", "TechnoBundle\\": "src/TechnoBundle",
"AssoBundle\\": "src/AssoBundle", "AssoBundle\\": "src/AssoBundle",
"APIBundle\\": "src/APIBundle" "APIBundle\\": "src/APIBundle",
"SocketBundle\\": "src/SocketBundle"
}, },
"classmap": [ "classmap": [
"app/AppKernel.php", "app/AppKernel.php",
......
<?php
namespace SocketBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DefaultController extends Controller
{
/**
* @Route("/")
*/
public function indexAction()
{
return $this->render('SocketBundle:Default:index.html.twig');
}
}
services:
# socket.example:
# class: SocketBundle\Example
# arguments: ["@service_id", "plain_value", "%parameter%"]
<?php
namespace SocketBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class SocketBundle extends Bundle
{
}
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