Inits all loaded apps, calls core specific actions and maps
344746
private function initApps()
    {

        // Run app specfic functions

        /* @var $app \Core\Amvc\App\Abstractapp */
        foreach ($this->apps as $app) {

            // Call additional Init() methods in apps
            if (method_exists($app, 'Init')) {
                $app->Init();
            }

            switch ($app->getName()) {
                case 'Core':

                    $config = $this->config->getStorage('Core');

                    // Create home url
                    $type = $this->user->isGuest() ? 'guest' : 'user';
                    $route = $config->get('home.' . $type . '.route');
                    $params = parse_ini_string($config->get('home.' . $type . '.params'));

                    $config->set('url.home', $app->url($route, $params));

                    break;
            }
        }
    }
25120
def init_app(self, app):
        
        if not hasattr(app, 'extensions'):  # pragma: no cover
            app.extensions = {}
        app.extensions['imagine'] = self

        self._set_defaults(app)

        self._redirect_code = app.config['IMAGINE_CACHE_REDIRECT_CODE']

        if isinstance(app.config['IMAGINE_ADAPTERS'], dict):
            self._adapters.update(app.config['IMAGINE_ADAPTERS'])
        if isinstance(app.config['IMAGINE_FILTERS'], dict):
            self._filters.update(app.config['IMAGINE_FILTERS'])

        self._handle_adapter(app)
        self._handle_filter_sets(app)

        self._add_url_rule(app)
1354030
public function initApps()
    {
        if (count($this->apps) > 0) {
            throw new AlreadyInitiatedException('The apps are already loaded!');
        }

        foreach ($this->appList as $className) {
            $instance = new $className($this);
            $this->apps->append($instance);
        }

        // Let the apps configure itself.
        foreach ($this->apps as $app) {
            $app->load();
        }

        // Let the apps register it parts.
        foreach ($this->apps as $app) {
            $app->registerRoutes(Router::getInstance());
        }
    }
1017032
def init_app(self, app):
        """"""
        app.cli.add_command(upgrader_cmd)
        app.extensions['invenio-upgrader'] = self
369436
def init_app(self, app):
        """"""
        self.init_config(app)
        app.extensions['invenio-github'] = self

        @app.before_first_request
        def connect_signals():
            """Connect OAuthClient signals."""
            from invenio_oauthclient.models import RemoteAccount
            from invenio_oauthclient.signals import account_setup_committed

            from .api import GitHubAPI
            from .handlers import account_post_init

            account_setup_committed.connect(
                account_post_init,
                sender=GitHubAPI.remote._get_current_object()
            )

            @event.listens_for(RemoteAccount, 'before_delete')
            def receive_before_delete(mapper, connection, target):
                """Listen for the 'before_delete' event."""
455319
def init_app(self, app, add_context_processor=True):
        

        # Check if login manager has been initialized
        if not hasattr(app, 'login_manager'):
            self.login_manager.init_app(
                app,
                add_context_processor=add_context_processor)

        # Clear flashed messages since we redirect to auth immediately
        self.login_manager.login_message = None
        self.login_manager.needs_refresh_message = None

        # Set default unauthorized callback
        self.login_manager.unauthorized_handler(self.unauthorized_callback)
1219104
def init_app(self, app):
        
        self.enabled = app.config.setdefault(C.ENABLED, True)
        self._swallow_errors = app.config.setdefault(
            C.SWALLOW_ERRORS, self._swallow_errors
        )
        self._storage_options.update(
            app.config.get(C.STORAGE_OPTIONS, {})
        )
        self._storage = storage_from_string(
            self._storage_uri
            or app.config.setdefault(C.STORAGE_URL, 'memory://'),
            **self._storage_options
        )
        strategy = (
            self._strategy
            or app.config.setdefault(C.STRATEGY, 'fixed-window')
        )
        if strategy not in STRATEGIES:
            raise ConfigurationError("Invalid rate limiting strategy %s" % strategy)
        self._limiter = STRATEGIES[strategy](self._storage)

        conf_limits = app.config.get(C.GLOBAL_LIMITS, None)
        if not self._global_limits and conf_limits:
            self._global_limits = [
                ExtLimit(
                    limit, self._key_func, None, False, None, None, None
                ) for limit in parse_many(conf_limits)
                ]
        app.request_middleware.append(self.__check_request_limit)
249470
def init_app(self, app, entry_point_group='invenio_celery.tasks',
                 **kwargs):
        """"""
        self.init_config(app)
        self.celery = FlaskCeleryExt(app).celery
        self.entry_point_group = entry_point_group
        app.extensions['invenio-celery'] = self
641285
public void init() {
        // load the filter mappings (copy of the list in case add is called while we iterate)
        List fMappings = new ArrayList(webAppConfig.getFilterMappings());

        // if the list isn't empty, show that this web app has filters
        if (!fMappings.isEmpty()) {
            if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE))
                logger.logp(Level.FINE, CLASS_NAME, "init", "filter mappings at init time ->" + fMappings);

            _filtersDefined = true;

            // add the filter mappings to the uri or servlet mapping lists
            Iterator iter = fMappings.iterator();

            while (iter.hasNext()) {
                FilterMapping fMapping = (FilterMapping) iter.next();

                addFilterMapping(fMapping);

                //PK86553 - start
                if (WCCustomProperties.INVOKE_FILTER_INIT_AT_START_UP){
                    String filterName = fMapping.getFilterConfig().getFilterName();
                    if (_filterWrappers.get(filterName) == null){
                        if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled()&&logger.isLoggable (Level.FINE))
                            logger.logp(Level.FINE, CLASS_NAME,"init", "load filter init at startup, filter ->"+ filterName);
                        try{
                            loadFilter(filterName);
                        }
                        catch (Throwable th) {
                            //logger.logp(Level.FINE, CLASS_NAME, "init", "Can not initialize filter ["+filterName+"] at startup.");//596191
                            LoggerHelper.logParamsAndException(logger, Level.SEVERE, CLASS_NAME,"init", "init.exception.thrown.by.filter.at.startup", new Object[]{filterName} , th );

                        }
                    }
                }
                //PK86553 - end
            }
        } else if (com.ibm.ejs.ras.TraceComponent.isAnyTracingEnabled() && logger.isLoggable(Level.FINE)) {
            logger.logp(Level.FINE, CLASS_NAME, "init", "no filter mappings at init time");
        }

    }
980243
def init_app(self, app):
        
        app.url_rule_class = partial(NavigationRule, copilot=self)
        app.context_processor(self.inject_context)
854487
def init_app(self, app):
        """"""
        app.config.from_pyfile('{0}.cfg'.format(app.name), silent=True)
781594
public function onInit()
    {
        $func = Util::get($this->params, '{init}', null);
        if (is_callable($func)) {
            $this->mapState = $func($data);
        }
    }
474093
def init_app(self, app):
        """"""
        super(InvenioIIIFAPI, self).init_app(app)
        api = Api(app=app)
        self.iiif_ext.init_restful(api, prefix=app.config['IIIF_API_PREFIX'])
103251
def init_app(kls):
    
    if not hasattr(kls, "__call__"):
        raise exceptions.MochaError("init_app: '%s' is not callable" % kls)
    Mocha._init_apps.add(kls)
    return kls
370024
def init_app(self, app=None, blueprint=None, additional_blueprints=None):
        
        if app is not None:
            self.app = app

        if blueprint is not None:
            self.blueprint = blueprint

        for resource in self.resources:
            self.route(resource['resource'],
                       resource['view'],
                       *resource['urls'],
                       url_rule_options=resource['url_rule_options'])

        if self.blueprint is not None:
            self.app.register_blueprint(self.blueprint)

        if additional_blueprints is not None:
            for blueprint in additional_blueprints:
                self.app.register_blueprint(blueprint)

        self.app.config.setdefault('PAGE_SIZE', 30)
390817
function init (prefs, callback) {
	options = _.extend(defaults, prefs);
	app = options.app || express();
	app.use(cors());

	ramlMocker.generate(options, process(function(requestsToMock){
		requestsToMock.forEach(function(reqToMock){
			addRoute(reqToMock);
		});
		log(new Array(30).join('='));
		log('%s[%s]%s API routes generated', colors.qyan, requestsToMock.length, colors.default);

		if(typeof callback === 'function'){
			callback(app);
		}
	}));

	var watcher = watch();
	var server = launchServer(app);

	function close () {
		if (watcher) { watcher.close(); }
		if (server) { server.close(); }
	}

	return {
		close: close,
		server: server,
		watcher: watcher
	};
}
967953
public void init(App app, Rec record, Map<String,Object> properties)
    {
        m_app = app;
    }