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.     private ?int $maxAge null;
  11.     private ?array $states null;
  12.     /**
  13.      * @return string
  14.      */
  15.     public function getAliasName()
  16.     {
  17.         return self::ALIAS;
  18.     }
  19.     /**
  20.      * @return bool
  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. }