/*
Init the context with time and pid.
501078
public function initContext()
    {
        $this->context = array();

        $this->addContext('time', microtime(true));

        $this->addContext('bouncer', array('pid' => getmypid()));
    }
208217
def init_app(self, app):
        """"""
        self.init_config(app)
        app.extensions['invenio-pidrelations'] = _InvenioPIDRelationsState(app)
463580
public void init(boolean useDirect, int outSize, int inSize, int cacheSize) {
        super.init(useDirect, outSize, inSize, cacheSize);
    }
155526
public void init(Configuration configuration) throws Exception {
        if (configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME) != null) {
            log.debug("Configuring context timeout with value ", configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME));
            try {
                contextTimeout = Long.parseLong(configuration.getBootstrapPropertyResolver().getProperty(CONTEXT_TIMEOUT_NAME));
            } catch (NumberFormatException e) {
                log.warn("Init parameter ", CONTEXT_TIMEOUT_NAME, " is not a parsable long, timeout will be ", " instead");
                contextTimeout = DEFAULT_CONTEXT_TIMEOUT;
            }
        }
    }
183684
public void initialize(Context context) {
    if (!isInitialized) {
      initializePicasso(context);
      initializeData(context);
      isInitialized = true;
    }
  }
616488
public void init(ServletContext context) {
        if (profiles != null) {
            for (IDiagramProfile profile : profiles) {
                profile.init(context);
                _registry.put(profile.getName(),
                              profile);
            }
        }
    }
1162593
public static void init(Context context) {
        if (sInitCalled) {
            return;
        }

        sInitCalled = true;

        try {
            DateTimeZone.setProvider(new ResourceZoneInfoProvider(context));
        }
        catch (IOException e) {
            throw new RuntimeException("Could not read ZoneInfoMap. You are probably using Proguard wrong.", e);
        }

        context.getApplicationContext()
            .registerReceiver(new TimeZoneChangedReceiver(), new IntentFilter(Intent.ACTION_TIMEZONE_CHANGED));
    }
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();
    }
666879
def initialize(self, pid, ore_software_id=d1_common.const.ORE_SOFTWARE_ID):
        """"""
        # Set nice prefixes for the namespaces
        for k in list(d1_common.const.ORE_NAMESPACE_DICT.keys()):
            self.bind(k, d1_common.const.ORE_NAMESPACE_DICT[k])
        # Create the ORE entity
        oid = self._pid_to_id(pid)
        ore = rdflib.URIRef(oid)
        self.add((ore, rdflib.RDF.type, ORE.ResourceMap))
        self.add((ore, DCTERMS.identifier, rdflib.term.Literal(pid)))
        self.add((ore, DCTERMS.creator, rdflib.term.Literal(ore_software_id)))
        # Add an empty aggregation
        ag = rdflib.URIRef(oid + "#aggregation")
        self.add((ore, ORE.describes, ag))
        self.add((ag, rdflib.RDF.type, ORE.Aggregation))
        self.add((ORE.Aggregation, rdflib.RDFS.isDefinedBy, ORE.term("")))
        self.add(
            (ORE.Aggregation, rdflib.RDFS.label, rdflib.term.Literal("Aggregation"))
        )
        self._ore_initialized = True
933592
public void init (int invOid, int invCode, InvocationDirector invDir)
    {
        _invOid = invOid;
        _invCode = invCode;
        _invdir = invDir;
    }
343649
public static synchronized void init(Context context) {
        mContext = context;

        // Set the appropriate log TAG
        setTAG(QuickUtils.system.getApplicationNameByContext());

        // resets all timestamps
        QuickUtils.timer.resetAllTimestamps();

        // init Rest
        QuickUtils.rest.init();

        // init image cache
        QuickUtils.imageCache.initialize(context);

        // init the objects cache
        try {
            cacheMagic.init(4096); // in bytes
        } catch (Exception e) {
           QuickUtils.log.e("Error initing cache");
        }
    }
1238877
protected function init() {
        $this->context = \context_system::instance();
        $this->data['crud'] = 'u';
        $this->data['edulevel'] = self::LEVEL_OTHER;
        $this->data['objecttable'] = 'external_services';
    }
1173920
@Override
    public void initialize(BeanContext context) {
        Resource resource = ConsoleUtil.getConsoleResource(context);
        initialize(context, ResourceHandle.use(resource));
    }
887924
public static void init(Context context, boolean nativeExopackage) {
    try {
      init(context, nativeExopackage ? SOLOADER_ENABLE_EXOPACKAGE : 0);
    } catch (IOException ex) {
      throw new RuntimeException(ex);
    }
  }
77227
public static void init(Context context, String name, int version, int cacheSize, LogLevel logLevel) {
		sLogLevel = logLevel;

		if (sInitialized) {
			if (sLogLevel.log(LogLevel.BASIC)) {
				Log.d(TAG, "Already initialized.");
			}
			return;
		}

		try {
			Class adapterClass = Class.forName(AdapterHolder.IMPL_CLASS_FQCN);
			sAdapterHolder = (AdapterHolder) adapterClass.newInstance();
		} catch (Exception e) {
			if (sLogLevel.log(LogLevel.BASIC)) {
				Log.e(TAG, "Failed to initialize.", e);
			}
		}

		sContext = context.getApplicationContext();
		sDatabaseHelper = new DatabaseHelper(sContext, name, version);
		sSQLiteDatabase = sDatabaseHelper.getWritableDatabase();
		sCache = new LruCache<String, Model>(cacheSize);

		sInitialized = true;
	}
1291624
@Override
    public void initialize(ExtensionContext context) {
        SubsystemRegistration registration = context.registerSubsystem(SUBSYSTEM_NAME, JGroupsModel.CURRENT.getVersion());

        registration.registerSubsystemModel(new JGroupsSubsystemResourceDefinition(context.isRuntimeOnlyRegistrationValid()));
        registration.registerXMLElementWriter(new JGroupsSubsystemXMLWriter());
    }
242048
function createContext(req, res, context, done) {
  debug('default createContext - does nothing', context);
  process.nextTick(done.bind(null, null, context));
}