Commit 03a3058d authored by alexpott's avatar alexpott

Issue #2905109 by iainp999, gawaksh, msankhala, joachim, borisson_, alexpott:...

Issue #2905109 by iainp999, gawaksh, msankhala, joachim, borisson_, alexpott: DrupalKernel::guessApplicationRoot() should document what the assumptions are and what it's doing
parent 759371de
......@@ -298,12 +298,16 @@ public function __construct($environment, $class_loader, $allow_dumping = TRUE,
}
/**
* Determine the application root directory based on assumptions.
* Determine the application root directory based on this file's location.
*
* @return string
* The application root.
*/
protected static function guessApplicationRoot() {
// Determine the application root by:
// - Removing the namespace directories from the path.
// - Getting the path to the directory two levels up from the path
// determined in the previous step.
return dirname(dirname(substr(__DIR__, 0, -strlen(__NAMESPACE__))));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment