public function redirect($url, array $params = [], $status = 302)
    {
        if (!empty($params)) {
            $url = rtrim(preg_replace('/\?.*/', '', $url), '/');
            $url .= "?" . http_build_query($params);
        }

        $this->statusCode = $status;
        $this->headers->set('Location', $url);

        $this->getMbAudit()->setResponseType('redirect');
        $this->getMbAudit()->setResponseData([
            'url' => $url,
        ]);

        return true;
    }
public function redirect($url, array $params = [], $status = 302)
    {
        if (!empty($params)) {
            $url = rtrim(preg_replace('/\?.*/', '', $url), '/');
            $url .= "?" . http_build_query($params);
        }

        $this->statusCode = $status;
        $this->headers->set('Location', $url);

        $this->getMbAudit()->setResponseType('redirect');
        $this->getMbAudit()->setResponseData([
            'url' => $url,
        ]);

        return true;
    }
public function redirect ( $ url , array $ params = [ ] , $ status = 302 ) { if ( ! empty ( $ params ) ) { $ url = rtrim ( preg_replace ( '/\?.*/' , '' , $ url ) , '/' ) ; $ url .= "?" . http_build_query ( $ params ) ; } $ this -> statusCode = $ status ; $ this -> headers -> set ( 'Location' , $ url ) ; $ this -> getMbAudit ( ) -> setResponseType ( 'redirect' ) ; $ this -> getMbAudit ( ) -> setResponseData ( [ 'url' => $ url , ] ) ; return true ; }
Redirect a page

@param string $url
@param array  $params

@param int    $status

@return bool
Redirect a page