original_string: protected function _environmentDetector($detect)
      {
          if (isset($detect['env'])) {
              if (isset($detect['value'])) {
                  return $this->getEnv($detect['env']) == $detect['value'];
              }
              if (isset($detect['pattern'])) {
                  return (bool)preg_match($detect['pattern'], $this->getEnv($detect['env']));
              }
              if (isset($detect['options'])) {
                  $pattern = '/' . implode('|', $detect['options']) . '/i';
  
                  return (bool)preg_match($pattern, $this->getEnv($detect['env']));
              }
          }
  
          return false;
      }
code: protected function _environmentDetector($detect)
      {
          if (isset($detect['env'])) {
              if (isset($detect['value'])) {
                  return $this->getEnv($detect['env']) == $detect['value'];
              }
              if (isset($detect['pattern'])) {
                  return (bool)preg_match($detect['pattern'], $this->getEnv($detect['env']));
              }
              if (isset($detect['options'])) {
                  $pattern = '/' . implode('|', $detect['options']) . '/i';
  
                  return (bool)preg_match($pattern, $this->getEnv($detect['env']));
              }
          }
  
          return false;
      }
code_tokens: protected function _environmentDetector ( $ detect ) { if ( isset ( $ detect [ 'env' ] ) ) { if ( isset ( $ detect [ 'value' ] ) ) { return $ this -> getEnv ( $ detect [ 'env' ] ) == $ detect [ 'value' ] ; } if ( isset ( $ detect [ 'pattern' ] ) ) { return ( bool ) preg_match ( $ detect [ 'pattern' ] , $ this -> getEnv ( $ detect [ 'env' ] ) ) ; } if ( isset ( $ detect [ 'options' ] ) ) { $ pattern = '/' . implode ( '|' , $ detect [ 'options' ] ) . '/i' ; return ( bool ) preg_match ( $ pattern , $ this -> getEnv ( $ detect [ 'env' ] ) ) ; } } return false ; }
docstring: Detects if a specific environment variable 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 environment variable is present .