original_string: protected function detectFsRoot()
      {
          Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'start');
          switch (true)
          {
              case Eresus_Kernel::isCLI():
                  $path = reset($GLOBALS['argv']);
                  Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using global $argv variable: %s', $path);
                  $path = dirname($path);
                  break;
              default:
                  Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using $_SERVER["SCRIPT_FILENAME"]: %s',
                      $_SERVER['SCRIPT_FILENAME']);
                  $path = dirname($_SERVER['SCRIPT_FILENAME']);
          }
  
          $path = Eresus_FS_Tool::normalize($path);
          Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '"%s"', $path);
  
          return $path;
      }
code: protected function detectFsRoot()
      {
          Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'start');
          switch (true)
          {
              case Eresus_Kernel::isCLI():
                  $path = reset($GLOBALS['argv']);
                  Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using global $argv variable: %s', $path);
                  $path = dirname($path);
                  break;
              default:
                  Eresus_Kernel::log(__METHOD__, LOG_DEBUG, 'Using $_SERVER["SCRIPT_FILENAME"]: %s',
                      $_SERVER['SCRIPT_FILENAME']);
                  $path = dirname($_SERVER['SCRIPT_FILENAME']);
          }
  
          $path = Eresus_FS_Tool::normalize($path);
          Eresus_Kernel::log(__METHOD__, LOG_DEBUG, '"%s"', $path);
  
          return $path;
      }
code_tokens: protected function detectFsRoot ( ) { Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'start' ) ; switch ( true ) { case Eresus_Kernel :: isCLI ( ) : $ path = reset ( $ GLOBALS [ 'argv' ] ) ; Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'Using global $argv variable: %s' , $ path ) ; $ path = dirname ( $ path ) ; break ; default : Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , 'Using $_SERVER["SCRIPT_FILENAME"]: %s' , $ _SERVER [ 'SCRIPT_FILENAME' ] ) ; $ path = dirname ( $ _SERVER [ 'SCRIPT_FILENAME' ] ) ; } $ path = Eresus_FS_Tool :: normalize ( $ path ) ; Eresus_Kernel :: log ( __METHOD__ , LOG_DEBUG , '"%s"' , $ path ) ; return $ path ; }
docstring: Trying to determine application root directory
  
  In CLI mode $GLOBALS['argv'][0] used.
  
  In other modes $_SERVER['SCRIPT_FILENAME'] used.
  
  @return string
  @see fsRoot, getFsRoot()
docstring_tokens: Trying to determine application root directory