original_string: public static function setRequestInfo($request)
      {
          if ($request instanceof ServerRequest) {
              static::pushRequest($request);
          } else {
              deprecationWarning(
                  'Passing an array into Router::setRequestInfo() is deprecated. ' .
                  'Pass an instance of ServerRequest instead.'
              );
  
              $requestData = $request;
              $requestData += [[], []];
              $requestData[0] += [
                  'controller' => false,
                  'action' => false,
                  'plugin' => null
              ];
              $request = new ServerRequest([
                  'params' => $requestData[0],
                  'url' => isset($requestData[1]['here']) ? $requestData[1]['here'] : '/',
                  'base' => isset($requestData[1]['base']) ? $requestData[1]['base'] : '',
                  'webroot' => isset($requestData[1]['webroot']) ? $requestData[1]['webroot'] : '/',
              ]);
              static::pushRequest($request);
          }
      }
code: public static function setRequestInfo($request)
      {
          if ($request instanceof ServerRequest) {
              static::pushRequest($request);
          } else {
              deprecationWarning(
                  'Passing an array into Router::setRequestInfo() is deprecated. ' .
                  'Pass an instance of ServerRequest instead.'
              );
  
              $requestData = $request;
              $requestData += [[], []];
              $requestData[0] += [
                  'controller' => false,
                  'action' => false,
                  'plugin' => null
              ];
              $request = new ServerRequest([
                  'params' => $requestData[0],
                  'url' => isset($requestData[1]['here']) ? $requestData[1]['here'] : '/',
                  'base' => isset($requestData[1]['base']) ? $requestData[1]['base'] : '',
                  'webroot' => isset($requestData[1]['webroot']) ? $requestData[1]['webroot'] : '/',
              ]);
              static::pushRequest($request);
          }
      }
code_tokens: public static function setRequestInfo ( $ request ) { if ( $ request instanceof ServerRequest ) { static :: pushRequest ( $ request ) ; } else { deprecationWarning ( 'Passing an array into Router::setRequestInfo() is deprecated. ' . 'Pass an instance of ServerRequest instead.' ) ; $ requestData = $ request ; $ requestData += [ [ ] , [ ] ] ; $ requestData [ 0 ] += [ 'controller' => false , 'action' => false , 'plugin' => null ] ; $ request = new ServerRequest ( [ 'params' => $ requestData [ 0 ] , 'url' => isset ( $ requestData [ 1 ] [ 'here' ] ) ? $ requestData [ 1 ] [ 'here' ] : '/' , 'base' => isset ( $ requestData [ 1 ] [ 'base' ] ) ? $ requestData [ 1 ] [ 'base' ] : '' , 'webroot' => isset ( $ requestData [ 1 ] [ 'webroot' ] ) ? $ requestData [ 1 ] [ 'webroot' ] : '/' , ] ) ; static :: pushRequest ( $ request ) ; } }
docstring: Takes parameter and path information back from the Dispatcher, sets these
  parameters as the current request parameters that are merged with URL arrays
  created later in the request.
  
  Nested requests will create a stack of requests. You can remove requests using
  Router::popRequest(). This is done automatically when using Object::requestAction().
  
  Will accept either a Cake\Http\ServerRequest object or an array of arrays. Support for
  accepting arrays may be removed in the future.
  
  @param \Cake\Http\ServerRequest|array $request Parameters and path information or a Cake\Http\ServerRequest object.
  @return void
  @deprecatd 3.6.0 Support for arrays will be removed in 4.0.0
docstring_tokens: Takes parameter and path information back from the Dispatcher sets these parameters as the current request parameters that are merged with URL arrays created later in the request .