vendor/symfony-cmf/routing-bundle/src/Doctrine/Orm/Route.php line 22

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony CMF package.
  4.  *
  5.  * (c) Symfony CMF
  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 Symfony\Cmf\Bundle\RoutingBundle\Doctrine\Orm;
  11. use Symfony\Cmf\Bundle\RoutingBundle\Model\Route as RouteModel;
  12. /**
  13.  * The ORM route version.
  14.  *
  15.  * @author matteo caberlotto <mcaber@gmail.com>
  16.  * @author Wouter J <waldio.webdesign@gmail.com>
  17.  */
  18. class Route extends RouteModel
  19. {
  20.     protected string $name '';
  21.     /**
  22.      * Sort order of this route when it is returned by the route provider.
  23.      */
  24.     protected int $position 0;
  25.     public function setName(string $name): static
  26.     {
  27.         $this->name $name;
  28.         return $this;
  29.     }
  30.     public function getName(): string
  31.     {
  32.         return $this->name;
  33.     }
  34.     /**
  35.      * Set the sort order of this route.
  36.      */
  37.     public function setPosition(int $position): static
  38.     {
  39.         $this->position $position;
  40.         return $this;
  41.     }
  42.     /**
  43.      * Get the sort order of this route.
  44.      */
  45.     public function getPosition(): int
  46.     {
  47.         return $this->position;
  48.     }
  49.     /**
  50.      * {@inheritdoc}
  51.      */
  52.     public function getRouteKey(): string
  53.     {
  54.         return $this->getName();
  55.     }
  56. }