Initializes the action and ensures the temp path exists.
166110
public function init() {
        parent::init();

        if (empty($this->attachementClass)) {
            throw new \yii\base\Exception("attachementClass is required!");
        }

        $this->_organizer = Yii::$app->czaHelper->folderOrganizer;
        Yii::$app->response->format = Response::FORMAT_JSON;

        $this->tempPath = Yii::getAlias($this->tempPath);
        if (!is_dir($this->tempPath)) {
            FileHelper::createDirectory($this->tempPath, $this->dirMode, true);
        }
    }
675503
@PostConstruct
    public synchronized void initialize() {
        final FwWebDirection direction = assistWebDirection();
        final DoubleSubmitResourceProvider provider = direction.assistDoubleSubmitResourceProvider();
        allowsVerifyTokenBeforeValidation = provider != null && provider.allowsVerifyTokenBeforeValidation();
        showBootLogging();
    }
1167359
public function setTempPath(FilePathInterface $tempPath): void
    {
        if (!$tempPath->isDirectory()) {
            throw new InvalidFilePathException('Temp path "' . $tempPath . '" is not a directory.');
        }

        try {
            $this->tempPath = $this->documentRoot->withFilePath($tempPath);
        } catch (FilePathLogicException $e) {
            throw new InvalidFilePathException($e->getMessage());
        }
    }
818900
private void initialise() {
    try {
      addTrafficSource();
      addTrafficLayers();
    } catch (Exception exception) {
      Timber.e(exception, "Unable to attach Traffic to current style: ");
    } catch (UnsatisfiedLinkError error) {
      Timber.e(error, "Unable to load native libraries: ");
    }
  }
1371606
def init(self):
        
        if os.path.isdir(self.path):
            self.fetch()
        else:
            self.clone()
789047
@PostConstruct
  public void init()
    throws ConfigException, IOException
  {
    if (_path != null) {
      _rotateStream = RotateStream.create(_path);
    }
    else if (_pathFormat != null) {
      _rotateStream = RotateStream.create(_pathFormat);
    }
    else {
      throw new ConfigException(L.l("'path' is a required attribute of <{0}>.  Each <{0}> must configure the destination stream.", getTagName()));
    }

    if (_path != null
        && Files.exists(_path)
        && ! Files.isReadable(_path)
        && (_rolloverPeriod != null
           || _rolloverSize != null
           || _archiveFormat != null)) {
      throw new ConfigException(L.l("log path '{0}' is not readable and therefore cannot be rotated.", _path.toUri()));
    }

    RolloverLogBase rolloverLog = _rotateStream.getRolloverLog();

    if (_rolloverPeriod != null) {
      rolloverLog.setRolloverPeriod(_rolloverPeriod);
    }

    if (_rolloverSize != null) {
      rolloverLog.setRolloverSize(_rolloverSize);
    }
    
    _rotateStream.setMaxRolloverCount(_rolloverCount);
    
    if (_archiveFormat != null) {
      rolloverLog.setArchiveFormat(_archiveFormat);
    }

    _rotateStream.init();
  }
403741
public static final void init() {
        String settingDir = System.getProperty(SETTINGS_DIR);
        if (settingDir == null) {
            settingDir = System.getenv(SETTINGS_DIR);
        }
        if (settingDir == null) {
            throw Fault.create(SettingsFaultCodes.SettingsDirNotSpecified, SETTINGS_DIR);
        }
        init(settingDir);
    }
129263
protected void ensureExecutionInitialized() {
    if (execution == null && executionId != null) {
      execution = Context
          .getCommandContext()
          .getExecutionManager()
          .findExecutionById(executionId);
    }
  }
371963
protected function initializeCreateAction()
    {
        $propertyMappingConfiguration = $this->arguments[$this->resourceArgumentName]->getPropertyMappingConfiguration();
        $propertyMappingConfiguration->setTypeConverterOption(PersistentObjectConverter::class, PersistentObjectConverter::CONFIGURATION_CREATION_ALLOWED, true);
        $propertyMappingConfiguration->allowAllProperties();
    }
583795
public function init()
    {
        $this->routes = $this->routes->getRouteCollections();

        $this->dispatcher = $this->createDispatcher();

        $this->currentURL = $this->request->getPathInfo();

        $this->dispatch();
    }
49028
def init?(path = Dir.pwd)
      begin
        MiniGit.new(path)
      rescue Exception
        return false
      end
      true
    end
1025164
protected function initialize()
    {
        $actionResolverMiddleware = $this->getActionResolverMiddleware(
            $this->actionResolvers,
            $this->routingResultAttribute,
            self::$actionAttribute
        );

        $actionExecutorMiddleware = $this->getActionExecutorMiddleware(
            self::$actionAttribute,
            self::$payloadAttribute
        );

        $responderResolverMiddleware = $this->getResponderResolverMiddleware(
            $this->responderResolvers,
            self::$payloadAttribute,
            self::$responderAttribute
        );

        $responderExecutorMiddleware = $this->getResponderExecutorMiddleware(
            self::$responderAttribute,
            self::$payloadAttribute
        );

        $this->pipeEach($this->beforeActionResolverMiddlewares);
        $this->pipe($actionResolverMiddleware);
        $this->pipeEach($this->beforeActionExecutorMiddlewares);
        $this->pipe($actionExecutorMiddleware);
        $this->pipeEach($this->beforeResponderResolverMiddlewares);
        $this->pipe($responderResolverMiddleware);
        $this->pipeEach($this->beforeResponderExecutorMiddlewares);
        $this->pipe($responderExecutorMiddleware);
    }
1027346
protected function initAction()
    {
        $this->action = $this->argument('action');

        if (! in_array($this->action, ['start', 'stop', 'restart', 'reload', 'infos'], true)) {
            $this->error(
                "Invalid argument '{$this->action}'. Expected 'start', 'stop', 'restart', 'reload' or 'infos'."
            );

            return;
        }
    }
951002
public void initialize() {
        val pair = buildLoggerContext(environment, resourceLoader);
        pair.ifPresent(it -> {
            this.logConfigurationFile = it.getKey();
            this.loggerContext = it.getValue();
        });
    }
155466
protected function initializeAction()
    {
        parent::initializeAction();
        $this->solrConnectionManager = GeneralUtility::makeInstance(ConnectionManager::class);
        $this->apacheSolrDocumentRepository = GeneralUtility::makeInstance(Repository::class);

    }
78653
def init(self):
        
        if os.path.isdir(self.path):
            raise InvalidTodoFile
        if os.path.exists(self.path):
            with open(self.path, 'r') as f:
                tls = [tl.strip() for tl in f if tl]
                todos = map(_todo_from_file, tls)
                self.todos = todos
                for todo in todos:
                    if self.current_max_idx < todo['idx']:
                        self.current_max_idx = todo['idx']
        else:
            logger.warning('No todo files found, initialization a empty todo file')
            with open(self.path, 'w') as f:
                f.flush()
626851
public void initialize() {
		mIsForceStop = false;
		mTagStack.clear();
		mTagValueCache.clear();
		mTagAttrCache.clear();
		mCurrentTagKey = null;
	}