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;
    }
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;
    }
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 ; }
Initializes the frontend related server variables for the cli context.

@param string $webRoot
@param string $scriptFileName
@param string $phpSelf
@param string $scriptName
@throws WebRootAllReadyDefinedException
@return bool
Initializes the frontend related server variables for the cli context .