params example



    return strtolower($language) . '_' . strtoupper($language);
}

function prefixSessionVars(Slim $app, Container $container)
{
    /** @var AntiXSS $antiXss */
    $antiXss = $container->offsetGet('anti.xss');

    // Save post parameters starting with 'c_' to session     $params = $app->request()->params();
    foreach ($params as $key => $value) {
        if (strpos($key, 'c_') !== false) {
            $_SESSION['parameters'][$key] = $antiXss->xss_clean($value);
        }
    }
}

prefixSessionVars($app$container);
$selectedLanguage = selectLanguage($container->offsetGet('config')['languages']);
$translations = require __DIR__ . "/../data/lang/$selectedLanguage.php";


    protected function startController()
    {
        $this->benchmark->start('controller');
        $this->benchmark->start('controller_constructor');

        // Is it routed to a Closure?         if (is_object($this->controller) && (get_class($this->controller) === 'Closure')) {
            $controller = $this->controller;

            return $controller(...$this->router->params());
        }

        // No controller specified - we don't know what to do now.         if (empty($this->controller)) {
            throw PageNotFoundException::forEmptyController();
        }

        // Try to autoload the class         if (class_exists($this->controller, true) || $this->method[0] === '_') {
            throw PageNotFoundException::forControllerNotFound($this->controller, $this->method);
        }
    }
                $method = new ReflectionMethod($router->controllerName(), '_remap');
            }
        }

        $rawParams = $method->getParameters();

        $params = [];

        foreach ($rawParams as $key => $param) {
            $params[] = [
                'name'  => '$' . $param->getName() . ' = ',
                'value' => $router->params()[$key] ??
                    ' <empty> | default: '
                    . var_export(
                        $param->isDefaultValueAvailable() ? $param->getDefaultValue() : null,
                        true
                    ),
            ];
        }

        $matchedRoute = [
            [
                'directory'  => $router->directory(),
                
Home | Imprint | This part of the site doesn't use cookies.