AppserverIo\Appserver\Core\ApplicationServer::doSwitchSetupMode PHP Method

doSwitchSetupMode() protected method

Switches the running setup mode to the passed value.
protected doSwitchSetupMode ( string $newMode, string $configurationFilename ) : void
$newMode string The mode to switch to
$configurationFilename string The path of the configuration filename
return void
    protected function doSwitchSetupMode($newMode, $configurationFilename)
    {
        // load the current user from the naming directory
        $currentUser = $this->getNamingDirectory()->search('php:env/currentUser');
        // load the service instance and switch to the new setup mode
        /** @var \AppserverIo\Appserver\Core\Api\ContainerService $service */
        $service = $this->newService('AppserverIo\\Appserver\\Core\\Api\\ContainerService');
        $service->switchSetupMode($newMode, $configurationFilename, $currentUser);
    }