initializeSystem hook
341657
public function initializeSystemHook()
	{
		if (TL_MODE !== 'BE' || !\Input::get('rsfhr')) {
			return;
		}

		\Environment::set('queryString', preg_replace('(([&?])rsfhr=1(&|$))', '$1', \Environment::get('queryString')));

		// Fix missing CURRENT_ID if rsfhr is set
		if (\Input::get('act') === 'create' && \Input::get('id')) {
			\System::getContainer()->get('session')->set('CURRENT_ID', \Input::get('id'));
		}
	}
918916
def install_hooks():
    
    if PY3:
        return

    install_aliases()

    flog.debug('sys.meta_path was: {0}'.format(sys.meta_path))
    flog.debug('Installing hooks ...')

    # Add it unless it's there already
    newhook = RenameImport(RENAMES)
    if not detect_hooks():
        sys.meta_path.append(newhook)
    flog.debug('sys.meta_path is now: {0}'.format(sys.meta_path))
1219689
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $settings = include $this->filepath;

        // Check
        if (empty($settings)) {
            return;
        }

        // Update
        $this->configs = $settings;

        // Enable backend~frontend actions
        if (OL_ZEUS_ISADMIN) {
            // Backend
            add_action('init', [$this, 'addShortcodesBackend']);
        } else {
            // Frontend
            add_action('init', [$this, 'addShortcodesFrontend']);
        }
    }
980946
public function init()
    {
        if (true === $this->initialized) {
            return;
        }

        $this->registerPhpcrCommands();
        $this->registerPhpcrStandaloneCommands();
        $this->registerShellCommands();

        $event = new ApplicationInitEvent($this);
        $this->dispatcher->dispatch(PhpcrShellEvents::APPLICATION_INIT, $event);
        $this->initialized = true;
    }
260417
def start_system(components, bind_to, hooks={}):
    """"""
    deps = build_deps_graph(components)
    started_components = start_components(components, deps, None)

    run_hooks(hooks, started_components)

    if type(bind_to) is str:
        master = started_components[bind_to]
    else:
        master = bind_to

    setattr(master, '__components', started_components)
    return master
96825
function init(userOpts = {}) {
    const opts = Object.assign(
        {
            template: '[hash].[ext][query]',
            preservePath: false,
            hashFunction(contents) {
                return crypto
                    .createHash('sha1')
                    .update(contents)
                    .digest('hex')
                    .substr(0, 16);
            },
            transform(fileMeta) {
                return fileMeta;
            },
            ignore: []
        },
        userOpts
    );

    return (style, result) => {
        if (opts.basePath) {
            if (typeof opts.basePath === 'string') {
                opts.basePath = [path.resolve(opts.basePath)];
            } else {
                opts.basePath = opts.basePath.map(elem => path.resolve(elem));
            }
        } else {
            opts.basePath = [process.cwd()];
        }

        if (opts.dest) {
            opts.dest = path.resolve(opts.dest);
        } else {
            throw new Error('Option `dest` is required in postcss-copy');
        }

        const promises = [];
        style.walkDecls(decl => {
            if (decl.value && decl.value.indexOf('url(') > -1) {
                promises.push(processDecl(result, decl, opts));
            }
        });
        return Promise.all(promises).then(decls =>
            decls.forEach(decl => {
                decl.value = String(decl.value);
            })
        );
    };
}
218151
public static function init()
    {
        Daemon::$startTime = time();
        set_time_limit(0);

        Daemon::$defaultErrorLevel = error_reporting();
        Daemon::$restrictErrorControl = (bool)Daemon::$config->restricterrorcontrol->value;
        ob_start(['\PHPDaemon\Core\Daemon', 'outputFilter']);
        set_error_handler(['\PHPDaemon\Core\Daemon', 'errorHandler']);

        Daemon::checkSupports();

        Daemon::$initservervar = $_SERVER;
        Daemon::$masters = new Collection;
        Daemon::$shm_wstate = new ShmEntity(Daemon::$config->pidfile->value, Daemon::SHM_WSTATE_SIZE, 'wstate', true);
        Daemon::openLogs();
    }
659820
def _set_init_system(self, client):
        """"""
        if not self.init_system:
            try:
                out = ipa_utils.execute_ssh_command(
                    client,
                    'ps -p 1 -o comm='
                )
            except Exception as e:
                raise IpaDistroException(
                    'An error occurred while retrieving'
                    ' the distro init system: %s' % e
                )
            if out:
                self.init_system = out.strip()
198197
function inits() {
  log( "init", "step="+step+" ajaxOngoing="+ajaxOngoing );
  if ( getParam( 'nc' ) == 'true' ) {
    noCache = "?nc="+ Math.random();
  }

  if ( ajaxOngoing == 0 ) { 
    if ( step == "load-lang" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load module list...');
      loadLang();
      step = "loadmodulemap";
    } else if ( step == "loadmodulemap" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load module list...');
      loadModuleList();
      step = "loaddecor";
    } else if ( step == "loaddecor" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load decor config...');
      loadDecorList();
      step = "loadstructure";
    } else  if ( step == "loadstructure" ) {
      ajaxOngoing++;
      log( 'init', 'Load Structure File ...');
      loadStructure();
      step = "loadincludes";
    } else if ( step == "loadincludes" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load include JS modules ...');
      checkModules( );
      loadIncludes();
      step = "loadmodules";
    } else if ( step == "loadmodules" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load JS modules ...');
      loadModules();
      if ( layout.theme != null ) {
        loadCSSrelPath( 'css-custom/'+layout.theme+'.css' );
        //jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="css-custom/'+layout.theme+'.css" type="text/css" />');        
      }
      loadCSSrelPath( "css-custom/custom.css" );
      if ( pageInfo["layoutMode"] == 'tablet' ) {
        loadCSSrelPath( "css-custom/custom-t.css" );
        //jQuery('head').append('<link rel="stylesheet" rel="nofollow" href="css-custom/custom-t.css" type="text/css" />');        
      } else if ( pageInfo["layoutMode"] == 'mobile' ) {
        loadCSSrelPath( "css-custom/custom-m.css" );
        //jQuery('head').append('<link rel="st<ylesheet" rel="nofollow" href="css-custom/custom-m.css" type="text/css" />');
      } 
      step = "initmodules";
    } else  if ( step == "initmodules" ) {
      ajaxOngoing++;
      log( 'init', 'Load Structure File ...');
      initModules( layout );
      step = "buildstructure";
    } else  if ( step == "buildstructure" ) {
      ajaxOngoing++;
      log( 'init', 'Start to build HTML ...');
      buildStructure( layout );
      step = "loadres-ht";
    } else  if ( step == "loadres-ht" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load resources HTML ...');
      loadResourcesHT();
      step = "call-hooks";
    } else  if ( step == "call-hooks" ) {
      log( 'init', 'Call module hooks ...');
      callHooks();
      step = "loadres-js";
    } else  if ( step == "loadres-js" ) {
      ajaxOngoing++;
      log( 'init', 'Start to load resources JS ...');
      loadResourcesJS();
      step = "callbacks";
    } else  if ( step == "callbacks" ) {
      log( 'init', 'Start callback methods for resources...');
      resourceCallbacks();
      step = "dialogs";
    } else  if ( step == "dialogs" ) {
      log( 'init', 'Start load dialogs for resources...');
      resourceDialogs();
      step = "afterInit";
    } else  if ( step == "afterInit" ) {
      log( 'init', 'Start load dialogs for resources...');
      startModulesAfterPageLoad( layout );
      clearInterval( initTimerId );
      step = "done";
    }
  }  
}
187580
def on_load(name, options = {}, &block)
      @loaded[name].each do |base|
        execute_hook(name, base, options, block)
      end

      @load_hooks[name] << [block, options]
    end
354701
public static function init() {
		if ( ! isset( self::$instance ) && ! ( self::$instance instanceof Loader ) ) {
			self::$instance = new Loader();
			$modules        = array_merge( self::$available_modules, apply_filters( 'themeisle_sdk_modules', [] ) );
			foreach ( $modules as $key => $module ) {
				if ( ! class_exists( 'ThemeisleSDK\\Modules\\' . ucwords( $module, '_' ) ) ) {
					unset( $modules[ $key ] );
				}
			}
			self::$available_modules = $modules;
		}
	}
973845
def setup():
    
    global _displayhooks, _excepthooks
    if _displayhooks is not None:
        return

    _displayhooks = []
    _excepthooks = []

    # store any current hooks
    if sys.displayhook != sys.__displayhook__:
        _displayhooks.append(weakref.ref(sys.displayhook))

    if sys.excepthook != sys.__excepthook__:
        _excepthooks.append(weakref.ref(sys.excepthook))

    # replace the current hooks
    sys.displayhook = displayhook
    sys.excepthook = excepthook
1295922
private function init()
    {
        $this->cwd = getcwd();
        $this->installedPaths = array();

        $this->processExecutor = new ProcessExecutor($this->io);
        $this->filesystem = new Filesystem($this->processExecutor);
    }
1166582
def init_module(filesystem):
    """"""
    # pylint: disable=protected-access
    FakePath.filesystem = filesystem
    FakePathlibModule.PureWindowsPath._flavour = _FakeWindowsFlavour(
        filesystem)
    FakePathlibModule.PurePosixPath._flavour = _FakePosixFlavour(filesystem)
1037246
def uisetup(ui):
    """"""
    for hooktype in PREPOST_HOOKS:
        ui.setconfig("hooks", "pre-" + hooktype + ".autohooks", autohook)
        ui.setconfig("hooks", "post-" + hooktype + ".autohooks", autohook)
1331861
async function init () {
    // initialze logging
    initLogging(this.immutableApp)
    // initialize global dir config by merging module configs
    initDir(this.immutableApp)
    // initalize handlebars
    initHandlebars(this.immutableApp)
    // initalize express request handling - bodyParser, cookieParser, etc
    initExpress(this.immutableApp)
    // initialize app
    initApp(this.immutableApp)
    // add error handler after all other middleware and routers
    initErrorHandler(this.immutableApp)
    // initialize models
    await initModels(this.immutableApp)
    // intialize components after models since they may use models
    initComponents(this.immutableApp)
    // initialize services after models since they may use models
    await initServices(this.immutableApp)
    // set initialize flag to true
    this.immutableApp.initialized = true
    // debug
    debug('init', this.immutableApp)
}
87726
public function init()
    {
        // Check filepath
        if (empty($this->filepath)) {
            return;
        }

        // Get configurations
        $configs = include $this->filepath;

        // Check
        if (empty($configs)) {
            return;
        }

        // Iterate on configs
        foreach ($configs as $key => $props) {
            $props = !is_array($props) && !is_bool($props) ? [$props] : $props;

            if ('post_type' === $key) {
                // Add or Remove post type supports
                $this->addRemovePostTypeSupport($props);
            } else {
                // Add new theme supports
                $this->addRemoveThemeSupport($key, $props);
            }
        }
    }