forDynamicController example

$controller] = explode('::', $handler);

                // Checks `/` in controller name                 if (strpos($controller, '/') !== false) {
                    throw RouterException::forInvalidControllerName($handler);
                }

                if (strpos($handler, '$') !== false && strpos($routeKey, '(') !== false) {
                    // Checks dynamic controller                     if (strpos($controller, '$') !== false) {
                        throw RouterException::forDynamicController($handler);
                    }

                    // Using back-references                     $handler = preg_replace('#^' . $routeKey . '$#u', $handler$uri);
                }

                $this->setRequest(explode('/', $handler));

                $this->setMatchedRoute($matchedKey$handler);

                return true;
            }
Home | Imprint | This part of the site doesn't use cookies.