src/MVC/Controller.php
protected function to($controller = null, $params = null, $sec = false)
    {
        $url = $this->view->url($controller, $params, $sec);
        $this->redirect($url);
    }
protected function to($controller = null, $params = null, $sec = false)
    {
        $url = $this->view->url($controller, $params, $sec);
        $this->redirect($url);
    }
先生成连接再redirect

@param string|null $controller controller:action
@param string|array $params
@param bool $sec
@throws CoreException