public function initialize($webRoot, $scriptFileName = PATH_site, $phpSelf = '/index.php', $scriptName = '/index.php')
    {
        // if the environment has be initialized once, we do not need to initialize it twice.
        if ($this->isInitialized) {
            return false;
        }

        if (defined('TYPO3_PATH_WEB')) {
            throw new WebRootAllReadyDefinedException('TYPO3_PATH_WEB is already defined');
        }

        define('TYPO3_PATH_WEB', $webRoot);
        $_SERVER['SCRIPT_FILENAME'] = $scriptFileName;
        $_SERVER['PHP_SELF'] = $phpSelf;
        $_SERVER['SCRIPT_NAME'] = $scriptName;

        $this->isInitialized = true;
        return true;
    }