{@inheritdoc}

@see \Symfony\Component\Console\Command\Command::initialize()
509474
protected function initialize(InputInterface $input, OutputInterface $output)
    {
        if (!$this->canRunAsRoot && $this->isRunningAsRoot() === true) {
            $this->confirmRunningAsRoot($input, $output);
        }
    }
746469
public function registerInitial($command, $initType = 0)
    {
        if (is_array($initType)) {
            foreach ($initType as $init) {
                $this->registerInitial($command, $init);
            }

            return;
        }
        $command = strtoupper($command);

        if (isset($this->initials[$initType]) && !in_array($command, $this->initials[$initType])) {
            $this->initials[$initType][] = $command;
        }
    }
1099005
public function initialize()
    {
        parent::initialize();

        if (Configure::read('Swagger')) {
            $this->config = Hash::merge(static::$defaultConfig, Configure::read('Swagger'));
        }
    }
706636
public function init( $config = [ ] )
    {
        $this->initDefaults();

        $this->initMail( $config );

        $this->initLog( $config );

        $this->initDatabase( $config );

        $this->initRequest( $config );

        $this->initRouter( $config );

        $this->initSession( $config );

        $this->initAppName( $config );

        $this->initDefaultLanguage( $config );

//        $this->_initMaintenanceMode( $config );
    }
483163
public function init()
    {
        $this->config->set('http', [
            'request' => &$this->request,
            'response' => &$this->response,
        ]);

        Event::trigger('BeforeSystemInit', $this);

        if (!defined('IS_CONSOLE')) {
            $this->initHttpRequest();
        }

        Event::trigger('AfterSystemInit', $rtn);

        return $rtn;
    }
328211
public function initialize()
    {
        if (true === $this->hasBeenInitialized) {
            return;
        }

        $this->hasBeenInitialized = true;

        foreach ($this->service as $service) {
            list($serviceClassName, $serviceOptions) = $this->manageServiceData($service);

            $this->serviceInstances[$serviceClassName] = $this->getServiceInstance($serviceClassName, $serviceOptions);
        }
    }
166775
private function initialize(): void
    {
        if ($this->mapping === null) {
            $this->mapping = $this->environment->getConfig()->get('templates.mapping', []);
        }
    }
196043
public function initialize()
    {
        parent::initialize();

        $this->responseFormat = [
            'statusKey' => (null !== Configure::read('ApiRequest.responseFormat.statusKey')) ? Configure::read('ApiRequest.responseFormat.statusKey') : 'status',
            'statusOkText' => (null !== Configure::read('ApiRequest.responseFormat.statusOkText')) ? Configure::read('ApiRequest.responseFormat.statusOkText') : 'OK',
            'statusNokText' => (null !== Configure::read('ApiRequest.responseFormat.statusNokText')) ? Configure::read('ApiRequest.responseFormat.statusNokText') : 'NOK',
            'resultKey' => (null !== Configure::read('ApiRequest.responseFormat.resultKey')) ? Configure::read('ApiRequest.responseFormat.resultKey') : 'result',
            'messageKey' => (null !== Configure::read('ApiRequest.responseFormat.messageKey')) ? Configure::read('ApiRequest.responseFormat.messageKey') : 'message',
            'defaultMessageText' => (null !== Configure::read('ApiRequest.responseFormat.defaultMessageText')) ? Configure::read('ApiRequest.responseFormat.defaultMessageText') : 'Empty response!',
            'errorKey' => (null !== Configure::read('ApiRequest.responseFormat.errorKey')) ? Configure::read('ApiRequest.responseFormat.errorKey') : 'error',
            'defaultErrorText' => (null !== Configure::read('ApiRequest.responseFormat.defaultErrorText')) ? Configure::read('ApiRequest.responseFormat.defaultErrorText') : 'Unknown request!'
        ];

        $this->responseStatus = $this->responseFormat['statusOkText'];

        $this->loadComponent('RequestHandler');
        $this->loadComponent('RestApi.AccessControl');
    }
1148829
public function _initialize() {
        $config = Config::getFileConfig()[ 'rpc_service' ];
        $this->config = array_merge($this->config, $config);
    }
1146679
protected function init()
    {
        $this->addCommand(Queue\WorkerCommand::class);
        $this->addCommand(Queue\TableCommand::class);
        $this->addCommand(Queue\FailedTableCommand::class);
        $this->addCommand(Queue\RetryCommand::class);
        $this->addCommand(Queue\RestartCommand::class);
        $this->addCommand(Queue\RemoveFailedCommand::class);
    }
1244116
public function init()
    {
        $this->container = $this->initContainer();

        if ($this->container->has(ServerRequestInterface::class)) {
            $this->baseRequest = $this->container->get(ServerRequestInterface::class);
        }
        
        if ($this->container->has(ResponseInterface::class)) {
            $this->baseResponse = $this->container->get(ResponseInterface::class);
        }
    }
358635
protected function init()
    {
        $this->addCommand(GenerateCommand::class);
        $this->addCommand(ClearCacheCommand::class);
        $this->addCommand(LangMergeCommand::class);
        $this->addCommand(MailTestCommand::class);
        $this->addCommand(UpCommand::class);
        $this->addCommand(DownCommand::class);
        $this->addCommand(ModeCommand::class);

        parent::init();
    }
27897
protected function init()
	{
		parent::init();
		if(empty($_SERVER['argv']))
			die('This script must be run from the command line.');
		$this->_runner=$this->createCommandRunner();
		$this->_runner->commands=$this->commandMap;
		$this->_runner->addCommands($this->getCommandPath());
	}
425673
protected function initialize()
    {
        if ($this->initialized) {
            return;
        }

        $this->policyConfiguration = $this->configurationManager->getConfiguration(ConfigurationManager::CONFIGURATION_TYPE_POLICY);
        $this->emitConfigurationLoaded($this->policyConfiguration);

        $this->initializePrivilegeTargets();

        $privilegeTargetsForEverybody = $this->privilegeTargets;

        $this->roles = [];
        $everybodyRole = new Role('Neos.Flow:Everybody');
        $everybodyRole->setAbstract(true);
        if (isset($this->policyConfiguration['roles'])) {
            foreach ($this->policyConfiguration['roles'] as $roleIdentifier => $roleConfiguration) {
                if ($roleIdentifier === 'Neos.Flow:Everybody') {
                    $role = $everybodyRole;
                } else {
                    $role = new Role($roleIdentifier);
                    if (isset($roleConfiguration['abstract'])) {
                        $role->setAbstract((boolean)$roleConfiguration['abstract']);
                    }
                }

                if (isset($roleConfiguration['privileges'])) {
                    foreach ($roleConfiguration['privileges'] as $privilegeConfiguration) {
                        $privilegeTargetIdentifier = $privilegeConfiguration['privilegeTarget'];
                        if (!isset($this->privilegeTargets[$privilegeTargetIdentifier])) {
                            throw new SecurityException(sprintf('privilege target "%s", referenced in role configuration "%s" is not defined!', $privilegeTargetIdentifier, $roleIdentifier), 1395869320);
                        }
                        $privilegeTarget = $this->privilegeTargets[$privilegeTargetIdentifier];
                        if (!isset($privilegeConfiguration['permission'])) {
                            throw new SecurityException(sprintf('No permission set for privilegeTarget "%s" in Role "%s"', $privilegeTargetIdentifier, $roleIdentifier), 1395869331);
                        }
                        $privilegeParameters = isset($privilegeConfiguration['parameters']) ? $privilegeConfiguration['parameters'] : [];
                        try {
                            $privilege = $privilegeTarget->createPrivilege($privilegeConfiguration['permission'], $privilegeParameters);
                        } catch (\Exception $exception) {
                            throw new SecurityException(sprintf('Error for privilegeTarget "%s" in Role "%s": %s', $privilegeTargetIdentifier, $roleIdentifier, $exception->getMessage()), 1401886654, $exception);
                        }
                        $role->addPrivilege($privilege);

                        if ($roleIdentifier === 'Neos.Flow:Everybody') {
                            unset($privilegeTargetsForEverybody[$privilegeTargetIdentifier]);
                        }
                    }
                }

                $this->roles[$roleIdentifier] = $role;
            }
        }

        // create ABSTAIN privilege for all uncovered privilegeTargets
        /** @var PrivilegeTarget $privilegeTarget */
        foreach ($privilegeTargetsForEverybody as $privilegeTarget) {
            if ($privilegeTarget->hasParameters()) {
                continue;
            }
            $everybodyRole->addPrivilege($privilegeTarget->createPrivilege(PrivilegeInterface::ABSTAIN));
        }
        $this->roles['Neos.Flow:Everybody'] = $everybodyRole;

        // Set parent roles
        /** @var Role $role */
        foreach ($this->roles as $role) {
            if (isset($this->policyConfiguration['roles'][$role->getIdentifier()]['parentRoles'])) {
                foreach ($this->policyConfiguration['roles'][$role->getIdentifier()]['parentRoles'] as $parentRoleIdentifier) {
                    $role->addParentRole($this->roles[$parentRoleIdentifier]);
                }
            }
        }

        $this->emitRolesInitialized($this->roles);

        $this->initialized = true;
    }
290818
protected function initialize()
    {
        $command = $this->client->createCommand('MULTI');

        $this->client->executeCommand($command, function ($response) {
            if (false === $response) {
                throw new RuntimeException('Could not initialize a MULTI / EXEC transaction');
            }
        });
    }
491097
public static function init()
    {
        $properties = self::getProperties();

        self::$container = new Container();
        self::$container->setProperties($properties);
        self::$container->autoloadServerAnnotation();

        $definition = self::getServerDefinition();
        self::$container->addDefinitions($definition);
        self::$container->initBeans();
    }
819990
public function init()
    {
        if ($this->initialized) {
            return;
        }

        $parameters = [];

        foreach ($this->parameterRepository->getAllParameters() as $parameter) {
            $configurationName = $parameter->getConfigurationName();

            if (!isset($parameters[$configurationName])) {
                $parameters[$configurationName] = [];
            }

            $parameters[$configurationName][$parameter->getName()] = $parameter;
        }

        $this->persistedParameters = $parameters;

        foreach ($this->configurations as $configuration) {
            $configurationName = $configuration->getName();
            $this->initConfiguration(
                $configuration,
                isset($parameters[$configurationName]) ? $parameters[$configurationName] : []
            );
        }

        $this->initialized = true;
    }