vendor/shopware/core/Framework/Routing/Annotation/RouteScope.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\Routing\Annotation;
  3. use Sensio\Bundle\FrameworkExtraBundle\Configuration\ConfigurationAnnotation;
  4. /**
  5.  * @Annotation
  6.  */
  7. class RouteScope extends ConfigurationAnnotation
  8. {
  9.     /** @var array */
  10.     private $scopes;
  11.     public function getAliasName()
  12.     {
  13.         return 'routeScope';
  14.     }
  15.     public function allowArray()
  16.     {
  17.         return false;
  18.     }
  19.     public function getScopes(): array
  20.     {
  21.         return $this->scopes;
  22.     }
  23.     public function setScopes(array $scopes): void
  24.     {
  25.         $this->scopes $scopes;
  26.     }
  27.     public function hasScope(string $scopeName): bool
  28.     {
  29.         return in_array($scopeName$this->scopestrue);
  30.     }
  31. }