28 lines
631 B
PHP
28 lines
631 B
PHP
<?php
|
|
|
|
namespace KupShop\ApiBundle\Controller;
|
|
|
|
use KupShop\ApiBundle\View\ApiView;
|
|
use KupShop\ApiBundle\View\DocsView;
|
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
|
use Symfony\Component\Routing\Annotation\Route;
|
|
|
|
class ApiController extends AbstractController
|
|
{
|
|
/**
|
|
* @Route("/api/docs/")
|
|
*/
|
|
public function docsAction(DocsView $view)
|
|
{
|
|
return $view->getResponse();
|
|
}
|
|
|
|
/**
|
|
* @Route("/api/{path}", requirements={"path": ".*"}, methods={"POST", "GET", "DELETE"})
|
|
*/
|
|
public function apiAction(ApiView $view)
|
|
{
|
|
return $view->getResponse();
|
|
}
|
|
}
|