Part of init() can repeat after (re)set $this->module.
345819
public function prepare()
    {    
        if (!empty($this->module->templateTransCat)) {
            $this->tcModule = $this->module->tcModule;
            $this->tcModels = $this->module->tcModels;
            
            $id = Inflector::camel2id(basename($this->className()));
            $this->tc = str_replace('*', "/model-{$id}", $this->module->templateTransCat);
        }
        if (!empty($this->module->params['pageSize'])) {
            $this->pageSize = $this->module->params['pageSize'];
        }
    }
1198702
function(options){
    // Prevent re-starting a module that is already started
    if (this._isInitialized){ return; }

    // start the sub-modules (depth-first hierarchy)
    _.each(this.submodules, function(mod){
      // check to see if we should start the sub-module with this parent
      if (mod.startWithParent){
        mod.start(options);
      }
    });

    // run the callbacks to "start" the current module
    this.triggerMethod("before:start", options);

    this._initializerCallbacks.run(options, this);
    this._isInitialized = true;

    this.triggerMethod("start", options);
  }
299054
protected function onInit()
    {
        $params = array();
        foreach ($this->params as $cKey=>$cValue) {
            switch(gettype($cValue))
            {
            case "string":
            case "number":
            case "object":
                $params[$cKey] = array(
                    "exp"=>$cValue,
                    "type"=>"number",
                );
                break;
            case "array":
                if (!isset($cValue['exp'])) {
                    $cValue['exp']="'no expression'";
                }
                if (!isset($cValue['type'])) {
                    $cValue['type']="unknown";
                }
                $params[$cKey] = $cValue;
                break;
            }
        }
        $this->params = $params;
    }
838920
function init() {
        parent::init();
        // Set own core attributes
        $this->can_subaction = ACTION_NONE;
        //$this->can_subaction = ACTION_HAVE_SUBACTIONS;

        // Set own custom attributes
        $this->sesskey_protected = false; // This action doesn't need sesskey protection

        // Get needed strings
        $this->loadStrings(array(
            // 'key' => 'module',
        ));
    }
1179683
private function _initialize()
    {
        $params = $this->getParameters();
        $n = count($params);

        if ($params !== null) {
            for ($i = 0; $i < $n; $i++) {
                if ($params[$i] !== null) {
                    $name = $params[$i]->getName();
                    switch ($name) {
                        case 'begintoken':
                            $this->_beginToken = $params[$i]->getValue();
                            break;
                        case 'endtoken':
                            $this->_endToken = $params[$i]->getValue();
                            break;
                        case 'dir':
                            $this->_dir = $params[$i]->getValue();
                            break;
                        case 'prefix':
                            $this->_prefix = $params[$i]->getValue();
                            break;
                        case 'postfix':
                            $this->_postfix = $params[$i]->getValue();
                            break;
                        case 'translatehtml':
                            $this->_translatehtml = $params[$i]->getValue();
                            break;
                    }
                }
            }
        }
    }
1040241
function postInitialize( $currentVersion = null, $originalContentObjectAttribute = null )
    {
        if ( $originalContentObjectAttribute === null )
            $originalContentObjectAttribute = $this;
        $classAttribute = $this->contentClassAttribute();
        $dataType = $classAttribute->dataType();
        if ( $dataType )
            $dataType->postInitializeObjectAttribute( $this, $currentVersion, $originalContentObjectAttribute );
    }
1083983
public static function setCurrentModule(string $module): void
    {
        if (static::$currentModule !== null) {
            $currentModule = static::$currentModule;
            throw new ApplicationException("Current module was already set to {$currentModule}; once current module is set, you can't change it");
        }

        static::$currentModule = $module;

        // register current module & run init.php if present
        static::registerModule($module);
    }
1334268
protected void initModule() {

        Object o;

        if (CmsStringUtil.isEmpty(getParamAction()) || CmsDialog.DIALOG_INITIAL.equals(getParamAction())) {
            // this is the initial dialog call
            if (CmsStringUtil.isNotEmpty(m_paramModule)) {
                // edit an existing module, get it from manager
                o = OpenCms.getModuleManager().getModule(m_paramModule);
            } else {
                // create a new module
                o = null;
            }
        } else {
            // this is not the initial call, get module from session
            o = getDialogObject();
        }

        if (!(o instanceof CmsModule)) {
            // create a new module
            m_module = new CmsModule();

        } else {
            // reuse module stored in session
            m_module = (CmsModule)((CmsModule)o).clone();
        }
    }
345587
private function _initialize()
    {
        if ($this->getInitialized()) {
            return;
        }

        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                if ('in' == $param->getName()) {
                    $this->setInputEncoding($param->getValue());
                } else {
                    if ('out' == $param->getName()) {
                        $this->setOutputEncoding($param->getValue());
                    }
                }
            }
        }

        $this->setInitialized(true);
    }
906480
private function _initNeverAllowedStr()
    {
        $this->_never_allowed_str = [
            'document.cookie'   => $this->_replacement,
            '(document).cookie' => $this->_replacement,
            'document.write'    => $this->_replacement,
            '(document).write'  => $this->_replacement,
            '.parentNode'       => $this->_replacement,
            '.innerHTML'        => $this->_replacement,
            '.appendChild'      => $this->_replacement,
            '-moz-binding'      => $this->_replacement,
            '<!--'              => '&lt;!--',
            '-->'               => '--&gt;',
            '<?'                => '&lt;?',
            '?>'                => '?&gt;',
            '<![CDATA['         => '&lt;![CDATA[',
            '<!ENTITY'          => '&lt;!ENTITY',
            '<!DOCTYPE'         => '&lt;!DOCTYPE',
            '<!ATTLIST'         => '&lt;!ATTLIST',
        ];
    }
355883
static function Init()
	{
		require_once 'verysimple/Phreeze/Controller.php';
		require_once 'verysimple/HTTP/RequestUtil.php';

		if (!self::$IS_INITIALIZED)
		{
			RequestUtil::NormalizeUrlRewrite();

			Controller::$SmartyViewPrefix = '';
			Controller::$DefaultRedirectMode = 'header';

			self::$IS_INITIALIZED = true;
		}

	}
1157895
public static function initSubmodules($module)
    {
        $submodules = ArrayHelper::merge($module->modules, static::submodules($module));
        foreach ($submodules as $submoduleId => $submodule) {
            if (is_array($submodule)) $submodule = $module->getModule($submoduleId);
            if (empty($submodule)) continue;
            static::initSubmodules($submodule);
        }
    }
775317
public function afterImport()
    {
        $obj = Craft::$app->globals;
        $refObject = new \ReflectionObject($obj);
        if ($refObject->hasProperty('_allGlobalSets')) {
            $refProperty1 = $refObject->getProperty('_allGlobalSets');
            $refProperty1->setAccessible(true);
            $refProperty1->setValue($obj, null);
        }
    }
235626
def _mod_init(self, low):
        '''
        
        '''
        # ensure that the module is loaded
        try:
            self.states['{0}.{1}'.format(low['state'], low['fun'])]  # pylint: disable=W0106
        except KeyError:
            return
        minit = '{0}.mod_init'.format(low['state'])
        if low['state'] not in self.mod_init:
            if minit in self.states._dict:
                mret = self.states[minit](low)
                if not mret:
                    return
                self.mod_init.add(low['state'])
498439
protected static function initialize() {
		if(file_exists("cache/dachi.modules.json")) {
			$modules = json_decode(file_get_contents("cache/dachi.modules.json"));

			foreach($modules as $module)
				self::$modules[$module->shortname] = new Module($module);
		}
	}
1178524
public static function init()
    {
        if(static::$isInited)
        {
            throw new \RuntimeException('MemoryTableManager can not repeated init');
        }
        foreach(static::$tables as $name => $option)
        {
            $table = new \Swoole\Table($option['size'] ?? 1024, $option['conflictProportion'] ?? 0.2);
            foreach($option['columns'] as $column)
            {
                $table->column($column['name'], $column['type'] ?? swoole_table::TYPE_STRING, $column['size'] ?? 0);
            }
            if(!$table->create())
            {
                throw new \RuntimeException('MemoryTableManager create table failed');
            }
            static::$tables[$name] = $table;
        }
        static::$isInited = true;
    }
822959
public static synchronized void init() {
        if (initialized)
            return;
        if (tc.isEntryEnabled()) {
            Tr.entry(tc, "init");
        }

        initialized = true;
        //defaultLevel = StatConstants.STATISTIC_SET_EXTENDED;
        defaultLevel = StatConstants.STATISTIC_SET_BASIC;
        moduleRoot = new ModuleItem();
        setInstrumentationLevel(defaultLevel);
        //disabled = false;
        try {
            MBeanServer mServer = ManagementFactory.getPlatformMBeanServer();
            ObjectName pmiMBean = new ObjectName(PmiConstants.MBEAN_NAME);
            mServer.registerMBean(PmiCollaboratorFactory.getPmiCollaborator(), pmiMBean);
            printAllMBeans();
        } catch (Exception e) {
            Tr.error(tc, "Unable to create Perf MBean.");
            FFDCFilter.processException(e, "com.ibm.ws.pmi.server.PmiRegistry", "Init");
        }
        if (tc.isEntryEnabled()) {
            Tr.exit(tc, "init");
        }
    }