private static parseHomeDirectory ( ) : null | string | ||
return | null | string | Returns the path to the home directory or `null` if none was found. |
private static function parseHomeDirectory()
{
try {
$homeDir = System::parseHomeDirectory();
System::denyWebAccess($homeDir);
return $homeDir;
} catch (InvalidConfigException $e) {
// Context variable was not found -> no home directory
// This happens often on web servers where the home directory is
// not set manually
return null;
}
}