original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Redirect a page
  
  @param string $url
  @param array  $params
  
  @param int    $status
  
  @return bool
docstring_tokens: Redirect a page