vendor/friendsofsymfony/rest-bundle/Controller/Annotations/View.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the FOSRestBundle package.
  4.  *
  5.  * (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace FOS\RestBundle\Controller\Annotations;
  11. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;
  12. /**
  13.  * View annotation class.
  14.  *
  15.  * @Annotation
  16.  * @Target({"METHOD","CLASS"})
  17.  */
  18. class View extends Template
  19. {
  20.     /**
  21.      * @var string
  22.      */
  23.     protected $templateVar;
  24.     /**
  25.      * @var int
  26.      */
  27.     protected $statusCode;
  28.     /**
  29.      * @var array
  30.      */
  31.     protected $serializerGroups;
  32.     /**
  33.      * @var bool
  34.      */
  35.     protected $populateDefaultVars true;
  36.     /**
  37.      * @var bool
  38.      */
  39.     protected $serializerEnableMaxDepthChecks;
  40.     /**
  41.      * Sets the template var name to be used for templating formats.
  42.      *
  43.      * @param string $templateVar
  44.      */
  45.     public function setTemplateVar($templateVar)
  46.     {
  47.         $this->templateVar $templateVar;
  48.     }
  49.     /**
  50.      * Returns the template var name to be used for templating formats.
  51.      *
  52.      * @return string
  53.      */
  54.     public function getTemplateVar()
  55.     {
  56.         return $this->templateVar;
  57.     }
  58.     /**
  59.      * @param int $statusCode
  60.      */
  61.     public function setStatusCode($statusCode)
  62.     {
  63.         $this->statusCode $statusCode;
  64.     }
  65.     /**
  66.      * @return int
  67.      */
  68.     public function getStatusCode()
  69.     {
  70.         return $this->statusCode;
  71.     }
  72.     /**
  73.      * @param array $serializerGroups
  74.      */
  75.     public function setSerializerGroups($serializerGroups)
  76.     {
  77.         $this->serializerGroups $serializerGroups;
  78.     }
  79.     /**
  80.      * @return array
  81.      */
  82.     public function getSerializerGroups()
  83.     {
  84.         return $this->serializerGroups;
  85.     }
  86.     /**
  87.      * @param bool $populateDefaultVars
  88.      */
  89.     public function setPopulateDefaultVars($populateDefaultVars)
  90.     {
  91.         $this->populateDefaultVars = (bool) $populateDefaultVars;
  92.     }
  93.     /**
  94.      * @return bool
  95.      */
  96.     public function isPopulateDefaultVars()
  97.     {
  98.         return $this->populateDefaultVars;
  99.     }
  100.     /**
  101.      * @param bool $serializerEnableMaxDepthChecks
  102.      */
  103.     public function setSerializerEnableMaxDepthChecks($serializerEnableMaxDepthChecks)
  104.     {
  105.         $this->serializerEnableMaxDepthChecks $serializerEnableMaxDepthChecks;
  106.     }
  107.     /**
  108.      * @return bool
  109.      */
  110.     public function getSerializerEnableMaxDepthChecks()
  111.     {
  112.         return $this->serializerEnableMaxDepthChecks;
  113.     }
  114. }