src/Hona/ApiBundle/Controller/MeController.php line 15

Open in your IDE?
  1. <?php
  2. namespace Hona\ApiBundle\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Component\HttpFoundation\Request;
  6. class MeController extends Controller
  7. {
  8.     /**
  9.      * @Route("/me", name="me_get", methods={"GET"})
  10.      * @param $request
  11.      */
  12.     public function meGETAction(Request $request)
  13.     {
  14.         $user $this->getUser();
  15.         return $this->forward('HonaApiBundle:User:userGET', [
  16.             'request' => $request,
  17.             'uuid'  => $user->getUuid(),
  18.         ]);
  19.     }
  20.     /**
  21.      * @Route("/me", name="me_put", methods={"PUT"})
  22.      * @param $request
  23.      */
  24.     public function mePUTAction(Request $request)
  25.     {
  26.         $user $this->getUser();
  27.         return $this->forward('HonaApiBundle:User:userPUT', [
  28.             'request' => $request,
  29.             'uuid'  => $user->getUuid(),
  30.         ]);
  31.     }
  32.     /**
  33.      * @Route("/me", name="me_delete", methods={"DELETE"})
  34.      * @param $request
  35.      */
  36.     public function meDELETEAction(Request $request)
  37.     {
  38.         $user $this->getUser();
  39.         return $this->forward('HonaApiBundle:User:userDELETE', [
  40.             'request' => $request,
  41.             'uuid'  => $user->getUuid(),
  42.         ]);
  43.     }
  44. }