Created
March 13, 2013 00:15
-
-
Save elnur/5148332 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Experium\Controller\Api; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method; | |
use JMS\DiExtraBundle\Annotation\Service; | |
use JMS\DiExtraBundle\Annotation\InjectParams; | |
use Elnur\AbstractControllerBundle\AbstractController; | |
use Experium\Manager\RequestManager; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
/** | |
* @Service("api.request_controller", parent="elnur.controller.abstract") | |
* @Route(service="api.request_controller") | |
*/ | |
class RequestController extends AbstractController | |
{ | |
/** | |
* @var RequestManager | |
*/ | |
private $requestManager; | |
/** | |
* @InjectParams | |
* | |
* @param RequestManager $requestManager | |
*/ | |
public function __construct(RequestManager $requestManager) | |
{ | |
$this->requestManager = $requestManager; | |
} | |
/** | |
* @Route("/request") | |
* @Method("GET") | |
* | |
* @return array | |
*/ | |
public function listAction() | |
{ | |
return $this->requestManager->findByResponsible($this->getUser()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment