src/core/AbstractWebCtrl.php
protected function redirect(string $uri, bool $isPermanent = false): void
    {
        $nCode = $isPermanent ? 301 : 302;
        Headers::getInstance()
            ->addByHttpCode($nCode)
            ->add('Location: '.$uri)
            ->run();
        exit;
    }
protected function redirect(string $uri, bool $isPermanent = false): void
    {
        $nCode = $isPermanent ? 301 : 302;
        Headers::getInstance()
            ->addByHttpCode($nCode)
            ->add('Location: '.$uri)
            ->run();
        exit;
    }
The method redirects to the URL, which passed as param. The HTTP-code is
302 as default. The method unconditional completes the script execution,
the code after it will not be executed.
@param string $uri
@param bool $isPermanent The flag of permanent redirect.
@return void