Init store method
421146
protected function init()
    {
        $this->addToStoreList('sorting', SortingListStore::class);
        $this->addToStoreList('category', ListByCategoryStore::class);
        $this->addToStoreList('active', ActiveListStore::class);
    }
994956
function _initialize() {

        var i, len, parts, tokens, moduleName, moduleObj, initialStates, initialState, currentStates, currentState, counter, hash;

        // Decode the content of our storage field...
        parts = _stateField.value.split("|");

        if (parts.length > 1) {

            initialStates = parts[0].split("&");
            for (i = 0, len = initialStates.length; i < len; i++) {
                tokens = initialStates[i].split("=");
                if (tokens.length === 2) {
                    moduleName = tokens[0];
                    initialState = tokens[1];
                    moduleObj = _modules[moduleName];
                    if (moduleObj) {
                        moduleObj.initialState = initialState;
                    }
                }
            }

            currentStates = parts[1].split("&");
            for (i = 0, len = currentStates.length; i < len; i++) {
                tokens = currentStates[i].split("=");
                if (tokens.length >= 2) {
                    moduleName = tokens[0];
                    currentState = tokens[1];
                    moduleObj = _modules[moduleName];
                    if (moduleObj) {
                        moduleObj.currentState = currentState;
                    }
                }
            }
        }

        if (parts.length > 2) {
            _fqstates = parts[2].split(",");
        }

        if (YAHOO.env.ua.ie) {

            if (typeof document.documentMode === "undefined" || document.documentMode < 8) {

                // IE < 8 or IE8 in quirks mode or IE7 standards mode
                _checkIframeLoaded();

            } else {

                // IE8 in IE8 standards mode
                YAHOO.util.Event.on(top, "hashchange",
                    function () {
                        var hash = _getHash();
                        _handleFQStateChange(hash);
                        _storeStates();
                    });

                _initialized = true;
                YAHOO.util.History.onLoadEvent.fire();

            }

        } else {

            // Start the thread that will have the responsibility to
            // periodically check whether a navigate operation has been
            // requested on the main window. This will happen when
            // YAHOO.util.History.navigate has been called or after
            // the user has hit the back/forward button.

            // On Safari 1.x and 2.0, the only way to catch a back/forward
            // operation is to watch history.length... We basically exploit
            // what I consider to be a bug (history.length is not supposed
            // to change when going back/forward in the history...) This is
            // why, in the following thread, we first compare the hash,
            // because the hash thing will be fixed in the next major
            // version of Safari. So even if they fix the history.length
            // bug, all this will still work!
            counter = history.length;

            // On Gecko and Opera, we just need to watch the hash...
            hash = _getHash();

            setInterval(function () {

                var state, newHash, newCounter;

                newHash = _getHash();
                newCounter = history.length;
                if (newHash !== hash) {
                    hash = newHash;
                    counter = newCounter;
                    _handleFQStateChange(hash);
                    _storeStates();
                } else if (newCounter !== counter && YAHOO.env.ua.webkit) {
                    hash = newHash;
                    counter = newCounter;
                    state = _fqstates[counter - 1];
                    _handleFQStateChange(state);
                    _storeStates();
                }

            }, 50);

            _initialized = true;
            YAHOO.util.History.onLoadEvent.fire();
        }
    }
1315286
public void init(Record record, Record recordToUpdate, boolean bRefreshAfterUpdate, boolean bUpdateOnClose, boolean bUpdateOnUpdate)
    {
        m_recordToUpdate = recordToUpdate;
        m_bRefreshAfterUpdate = bRefreshAfterUpdate;
        m_bUpdateOnClose = bUpdateOnClose;
        m_bUpdateOnUpdate = bUpdateOnUpdate;
        super.init(record);
    }
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)
}
1317513
function _initStorage(options) {
        var self = this;
        var dbInfo = {
            db: null
        };

        if (options) {
            for (var i in options) {
                dbInfo[i] = options[i];
            }
        }

        return new Promise(function(resolve, reject) {
            var openreq = indexedDB.open(dbInfo.name, dbInfo.version);
            openreq.onerror = function() {
                reject(openreq.error);
            };
            openreq.onupgradeneeded = function() {
                // First time setup: create an empty object store
                openreq.result.createObjectStore(dbInfo.storeName);
            };
            openreq.onsuccess = function() {
                dbInfo.db = openreq.result;
                self._dbInfo = dbInfo;
                resolve();
            };
        });
    }
80872
protected function initialize($data)
    {
        //Force conversion to array
        if (is_object($data)) $data = (array) $data;
        $schema = $this->_jsonSchema;

        /*
        * Alias management
        */
        foreach ($schema['definition'] as $property => $definition) {
            $alias = $definition['alias'];
            if ($alias && array_key_exists($alias, $data)) {
                $method = 'set' . ucfirst($alias);
                if (method_exists($this, $method)) {
                    $data[$property] = $this->$method($data[$alias]);
                } else {
                    $data[$property] = $data[$alias];
                }
            }
        }

        /**
         * Initialize data
         * Also create empty composed Store
         */

        foreach ($schema['definition'] as $property => $definition) {
            if (!in_array($property, $this->_storePropertiesCache)) {
                continue;
            }

            if ($definition['internal']) {
                continue;
            }

            //Find the value if there is one.
            if (!is_array($data)) {
                if (is_string($data)) {
                    throw new StoreException(
                        "Error initializing the store. Expected array on init data but got string : '".$data."'"
                        . " for property $property"
                    );
                } elseif (is_bool($data)) {
                    $value = "true";
                    if(!$data) $value = "false";
                    throw new StoreException(
                        "Error initializing the store. Expected array on init data but got boolean with (".$data.") value"
                        . " for property $property"
                    );
                } elseif (is_numeric($data)) {
                    throw new StoreException(
                        "Error initializing the store. Expected array on init data but got a numeric value : ".$data
                        . " for property $property"
                    );
                } else {
                    throw new StoreException(
                        "Error initializing the store. Expected array on init data but got ".gettype($data)
                        . " for property $property"
                    );
                }
            }
            if (array_key_exists($property, $data))
                $value = $data[$property];
            else {
                //To get default values
                $value = $this->$property;
            }

            /**
             * if we receive a array, but it's defined as object, we convert it
             * If not, the cast to Store is not done
             */
            if ($definition['type'] == 'object' && is_array($value)) {
                $value = (object) $value;
                $data[$property] = $value;
            }

            /**
             * if we receive a array, but it's defined as object, we convert it
             * If not, the cast to Store is not done
             */
            if ($definition['type'] == 'array' && is_object($value)) {
                $value = (array) $value;
                $data[$property] = $value;
            }


            /**
             * unSerialize Value
             */
            if (isset($definition['storeClasses'])) $storeClasses = $definition['storeClasses'];
            else $storeClasses = array();

            $storeClass = $this->getStoreClass(null, $storeClasses);

            if ($value) {
                $value = $this->unSerialize($value, $storeClasses, $definition);
            } elseif ($storeClass && $definition['type'] == 'object') {

                /**
                 * We create a store with no values only if it's NotNone
                 */
                if (in_array('NotBlank', $definition['validationConstraints'])) {
                    $value = StoreHelper::createClass($storeClass, $data);
                }

            } elseif ($definition['type'] == 'array') {
                $value = array();
            }

            if (!is_null($value)) {
                $method = 'set' . ucfirst($property);
                $this->_setPropertyValue($property, $value);
            }
        }
    }
42999
public function init()
    {
        $this->userStore = b8\Store\Factory::getStore('User');
        $this->userService = new UserService($this->userStore);
    }
1335851
public function init() {
        $attributes = $this->getAttributes();
        $fullPath = storage_path(
            $attributes['path']
        );

        if( Support\is_path_exists(
            $fullPath
        ) )
            $this->settings = Support\get_file_contents(
                $fullPath
            );
        else
            Support\dump_file($fullPath, json_encode([]));

        register_shutdown_function(function() use($fullPath) {
            Support\dump_file(
                $fullPath, $this->packData($this->settings)
            );
        });
    }
899318
function init(pluginInterface) {
    pi = pluginInterface;
    log = pi.log;
    localStorage = pi.localStorage;

    pollLog = localStorage.getItem('pollLog', []);

    resetPolling();
}
149190
async function init () {
  try {
    await sequelize.sync()
  } catch (err) {
    console.log(err)
    process.exit(-1)
  }
}
135214
def init(name, kind, args = {})
      get_storage(self.class.type, kind, name, args)
      true
    end
1029358
public function init()
    {
        $this->buildStore = Store\Factory::getStore('Build');
        $this->projectStore = Store\Factory::getStore('Project');
        $this->buildService = new BuildService($this->buildStore);
    }
126335
function(attrs) {
                    // Try to add things as early as possible to the store (#457).
                    // This is the earliest possible moment, even before any properties are set.
                    var id = attrs && attrs[this.constructor.id];
                    if (can.Model._reqs && id != null) {
                        this.constructor.store[id] = this;
                    }
                    can.Map.prototype.setup.apply(this, arguments);
                }
537800
function init(){
    self.type = config.type || 'redis';
    if(config.redisMock){
      self.db = config.redisMock;
    }
    else{
      if(config.redisUrl){
        self.redisData = config.redisUrl || null;
      }
      else if(config.redisEnv){
        self.redisData = process.env[config.redisEnv] || null;
      }
      else if(config.redisData){
        self.redisData = config.redisData;
      }
      self.readOnly = (typeof config.readOnly === 'boolean') ? config.readOnly : false;
      try {
        if (self.redisData) {
          if(typeof self.redisData === 'string'){
            self.db = redis.createClient(self.redisData,
              {'no_ready_check': true,
              retry_strategy: retryStrategy});
          } else {
            self.db = redis.createClient(self.redisData.port,
              self.redisData.hostname, {'no_ready_check': true,
              retry_strategy: retryStrategy});

            // don't call redis auth method if no auth info passed
            if (self.redisData.auth) {
              self.db.auth(self.redisData.auth);
            }
          }
          self.db.on('error', function(err) {
            console.log('Error ' + err);
          });
          process.on('SIGTERM', function() {
            self.db.quit();
          });
          log(false, 'Redis client created with the following defaults:', {expiration: self.defaultExpiration, verbose: self.verbose, readOnly: self.readOnly});
        } else {
          self.db = false;
          log(false, 'Redis client not created: no redis config provided');
        }
      } catch (err) {
        self.db = false;
        log(true, 'Redis client not created:', err);
      }
    }
  }
204126
private void init() {
    ServerSideServerStore serverStore = ehcacheStateService.getStore(storeIdentifier);
    ServerStoreBinding serverStoreBinding = new ServerStoreBinding(storeIdentifier, serverStore);
    CompletableFuture<Void> r1 = managementRegistry.register(serverStoreBinding);
    ServerSideConfiguration.Pool pool = ehcacheStateService.getDedicatedResourcePool(storeIdentifier);
    CompletableFuture<Void> allOf;
    if (pool != null) {
      allOf = CompletableFuture.allOf(r1, managementRegistry.register(new PoolBinding(storeIdentifier, pool, PoolBinding.AllocationType.DEDICATED)));
    } else {
      allOf = r1;
    }
    allOf.thenRun(() -> {
      managementRegistry.refresh();
      managementRegistry.pushServerEntityNotification(serverStoreBinding, EHCACHE_SERVER_STORE_CREATED.name());
    });
  }
239680
public function initializeObject()
    {
        if (file_exists($this->keystorePathAndFilename)) {
            $this->keys = unserialize(file_get_contents($this->keystorePathAndFilename));
        }
        $this->saveKeysOnShutdown = false;
    }
207140
def init ( method )
      raise TypeError, error_message(method, __method__) unless method.instance_of? Method
      @init = method
    end