original_string: protected function _headerDetector($detect)
      {
          foreach ($detect['header'] as $header => $value) {
              $header = $this->getEnv('http_' . $header);
              if ($header !== null) {
                  if (!is_string($value) && !is_bool($value) && is_callable($value)) {
                      return call_user_func($value, $header);
                  }
  
                  return ($header === $value);
              }
          }
  
          return false;
      }
code: protected function _headerDetector($detect)
      {
          foreach ($detect['header'] as $header => $value) {
              $header = $this->getEnv('http_' . $header);
              if ($header !== null) {
                  if (!is_string($value) && !is_bool($value) && is_callable($value)) {
                      return call_user_func($value, $header);
                  }
  
                  return ($header === $value);
              }
          }
  
          return false;
      }
code_tokens: protected function _headerDetector ( $ detect ) { foreach ( $ detect [ 'header' ] as $ header => $ value ) { $ header = $ this -> getEnv ( 'http_' . $ header ) ; if ( $ header !== null ) { if ( ! is_string ( $ value ) && ! is_bool ( $ value ) && is_callable ( $ value ) ) { return call_user_func ( $ value , $ header ) ; } return ( $ header === $ value ) ; } } return false ; }
docstring: Detects if a specific header is present.
  
  @param array $detect Detector options array.
  @return bool Whether or not the request is the type you are checking.
docstring_tokens: Detects if a specific header is present .