vendor/shopware/storefront/Framework/Cache/Annotation/HttpCache.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Storefront\Framework\Cache\Annotation;
  3. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation;
  4. /**
  5.  * @Annotation
  6.  */
  7. class HttpCache extends ConfigurationAnnotation
  8. {
  9.     public const ALIAS 'httpCache';
  10.     /**
  11.      * @var int|null
  12.      */
  13.     private $maxAge;
  14.     /**
  15.      * @var array
  16.      */
  17.     private $states;
  18.     public function getAliasName()
  19.     {
  20.         return self::ALIAS;
  21.     }
  22.     public function allowArray()
  23.     {
  24.         return true;
  25.     }
  26.     public function getMaxAge(): ?int
  27.     {
  28.         return $this->maxAge;
  29.     }
  30.     public function setMaxAge(?int $maxAge): void
  31.     {
  32.         $this->maxAge $maxAge;
  33.     }
  34.     public function getStates(): array
  35.     {
  36.         return $this->states ?? [];
  37.     }
  38.     public function setStates(?array $states): void
  39.     {
  40.         $this->states $states;
  41.     }
  42. }