original_string: private function resolveHeaders($headersForResolve)
      {
          $headers = [];
  
          foreach ($headersForResolve as $name => $value) {
              if (strpos($name, 'REDIRECT_') === 0) {
                  $name = substr($name, 9);
  
                  // Do not replace existing variables
                  if (array_key_exists($name, $headersForResolve)) {
                      continue;
                  }
              }
  
              if (substr($name, 0, 5) == 'HTTP_' || isset($this->specialHeaders[$name])) {
                  $headers[$name] = $value;
              }
          }
  
          return $headers;
      }
code: private function resolveHeaders($headersForResolve)
      {
          $headers = [];
  
          foreach ($headersForResolve as $name => $value) {
              if (strpos($name, 'REDIRECT_') === 0) {
                  $name = substr($name, 9);
  
                  // Do not replace existing variables
                  if (array_key_exists($name, $headersForResolve)) {
                      continue;
                  }
              }
  
              if (substr($name, 0, 5) == 'HTTP_' || isset($this->specialHeaders[$name])) {
                  $headers[$name] = $value;
              }
          }
  
          return $headers;
      }
code_tokens: private function resolveHeaders ( $ headersForResolve ) { $ headers = [ ] ; foreach ( $ headersForResolve as $ name => $ value ) { if ( strpos ( $ name , 'REDIRECT_' ) === 0 ) { $ name = substr ( $ name , 9 ) ; // Do not replace existing variables if ( array_key_exists ( $ name , $ headersForResolve ) ) { continue ; } } if ( substr ( $ name , 0 , 5 ) == 'HTTP_' || isset ( $ this -> specialHeaders [ $ name ] ) ) { $ headers [ $ name ] = $ value ; } } return $ headers ; }
docstring: Resolve headers from provided array
  
  @param array $headersForResolve array compatible with $_SERVER superglobal variable
  
  @return Headers Instance of Headers object from environment
docstring_tokens: Resolve headers from provided array