original_string: public static function marshalUriFromServer(array $server, array $headers)
      {
          $uri = parent::marshalUriFromServer($server, $headers);
          list($base, $webroot) = static::getBase($uri, $server);
  
          // Look in PATH_INFO first, as this is the exact value we need prepared
          // by PHP.
          $pathInfo = Hash::get($server, 'PATH_INFO');
          if ($pathInfo) {
              $uri = $uri->withPath($pathInfo);
          } else {
              $uri = static::updatePath($base, $uri);
          }
  
          if (!$uri->getHost()) {
              $uri = $uri->withHost('localhost');
          }
  
          // Splat on some extra attributes to save
          // some method calls.
          $uri->base = $base;
          $uri->webroot = $webroot;
  
          return $uri;
      }
code: public static function marshalUriFromServer(array $server, array $headers)
      {
          $uri = parent::marshalUriFromServer($server, $headers);
          list($base, $webroot) = static::getBase($uri, $server);
  
          // Look in PATH_INFO first, as this is the exact value we need prepared
          // by PHP.
          $pathInfo = Hash::get($server, 'PATH_INFO');
          if ($pathInfo) {
              $uri = $uri->withPath($pathInfo);
          } else {
              $uri = static::updatePath($base, $uri);
          }
  
          if (!$uri->getHost()) {
              $uri = $uri->withHost('localhost');
          }
  
          // Splat on some extra attributes to save
          // some method calls.
          $uri->base = $base;
          $uri->webroot = $webroot;
  
          return $uri;
      }
code_tokens: public static function marshalUriFromServer ( array $ server , array $ headers ) { $ uri = parent :: marshalUriFromServer ( $ server , $ headers ) ; list ( $ base , $ webroot ) = static :: getBase ( $ uri , $ server ) ; // Look in PATH_INFO first, as this is the exact value we need prepared // by PHP. $ pathInfo = Hash :: get ( $ server , 'PATH_INFO' ) ; if ( $ pathInfo ) { $ uri = $ uri -> withPath ( $ pathInfo ) ; } else { $ uri = static :: updatePath ( $ base , $ uri ) ; } if ( ! $ uri -> getHost ( ) ) { $ uri = $ uri -> withHost ( 'localhost' ) ; } // Splat on some extra attributes to save // some method calls. $ uri -> base = $ base ; $ uri -> webroot = $ webroot ; return $ uri ; }
docstring: Build a UriInterface object.
  
  Add in some CakePHP specific logic/properties that help
  preserve backwards compatibility.
  
  @param array $server The server parameters.
  @param array $headers The normalized headers
  @return \Psr\Http\Message\UriInterface a constructed Uri
docstring_tokens: Build a UriInterface object .