| Name | Size | Mode | Actions |
|---|---|---|---|
| AddTrait.php | 1778 | 0644 | editdlrm |
| HostTrait.php | 1663 | 0644 | editdlrm |
| LocalizedRouteTrait.php | 2533 | 0644 | editdlrm |
| PrefixTrait.php | 2398 | 0644 | editdlrm |
| RouteTrait.php | 3562 | 0644 | editdlrm |
/home/techb158/ileadtechnology.com/vendor/symfony/routing/Loader/Configurator/Traits/AddTrait.php (1778B)
*/ trait AddTrait { use LocalizedRouteTrait; /** * @var RouteCollection */ protected $collection; protected $name = ''; protected $prefixes; /** * Adds a route. * * @param string|array $path the path, or the localized paths of the route */ public function add(string $name, $path): RouteConfigurator { $parentConfigurator = $this instanceof CollectionConfigurator ? $this : ($this instanceof RouteConfigurator ? $this->parentConfigurator : null); $route = $this->createLocalizedRoute($this->collection, $name, $path, $this->name, $this->prefixes); return new RouteConfigurator($this->collection, $route, $this->name, $parentConfigurator, $this->prefixes); } public function alias(string $name, string $alias): AliasConfigurator { return new AliasConfigurator($this->collection->addAlias($name, $alias)); } /** * Adds a route. * * @param string|array $path the path, or the localized paths of the route */ public function __invoke(string $name, $path): RouteConfigurator { return $this->add($name, $path); } }