symfony-notifications/NotificationsBundle/Controller/MainController.php

18 lines
569 B
PHP
Raw Normal View History

2019-03-01 12:18:06 +01:00
<?php
2019-03-01 12:49:26 +01:00
namespace Bluesquare\NotificationsBundle\Controller;
2019-03-01 12:18:06 +01:00
2019-03-01 12:49:26 +01:00
use Bluesquare\NotificationsBundle\Service\FooService;
2019-03-01 12:18:06 +01:00
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
class MainController extends AbstractController
{
public function index(Request $request)
{
die($request->getMethod());
// ON PEUT PAS INJECTER UN SERVICE DU BUNDLE EN QUESTION DANS LES ARGS DONC ON LE récupère ainsi :
2019-03-01 12:49:26 +01:00
$this->get('bluesquare.notifications_bundle.foo')->foo();
2019-03-01 12:18:06 +01:00
die('hello');
}
}