AutoRouter example

$autoRoutesImproved = config(Feature::class)->autoRoutesImproved ?? false;
            if ($autoRoutesImproved) {
                $this->autoRouter = new AutoRouterImproved(
                    $this->collection->getRegisteredControllers('*'),
                    $this->collection->getDefaultNamespace(),
                    $this->collection->getDefaultController(),
                    $this->collection->getDefaultMethod(),
                    $this->translateURIDashes,
                    $this->collection->getHTTPVerb()
                );
            } else {
                $this->autoRouter = new AutoRouter(
                    $this->collection->getRoutes('cli', false), // @phpstan-ignore-line                     $this->collection->getDefaultNamespace(),
                    $this->collection->getDefaultController(),
                    $this->collection->getDefaultMethod(),
                    $this->translateURIDashes,
                    $this->collection->getHTTPVerb()
                );
            }
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.