Initialize `static::$_scopes` with a `lithium\core\Configuration` instance.
340530
protected static function _initScopes() {
		static::$_scopes = static::_instance('configuration');

		static::$_scopes->initConfig = function($name, $config) {
			$defaults = [
				'absolute' => false,
				'host' => null,
				'scheme' => null,
				'base' => null,
				'prefix' => '',
				'pattern' => '',
				'values' => [],
				'library' => $name
			];

			$config += $defaults;

			if (!$config['pattern']) {
				$config = static::_compileScope($config);
			}
			$config['base'] = $config['base'] ? trim($config['base'], '/') : $config['base'];
			return $config;
		};
	}
491681
public function init()
    {
        $this->db = \PHPDaemon\Clients\Mongo\Pool::getInstance($this->config->mongoclientname->value);
        $this->cache = \PHPDaemon\Clients\Memcache\Pool::getInstance($this->config->memcacheclientname->value);
        if (!isset($this->config->limitinstances)) {
            $this->log('missing \'limitInstances\' directive');
        }
    }
971389
function init() {
        if (is_null($this->conf)) {
            $this->conf = [];
        }
        
        $yp = parse_ini_file("yunpian.ini");
        foreach ($yp as $key => $value) {
            $this->conf[$key] = $value;
        }
        return $this;
    }
920946
public function init()
    {
        if ($this->isEnabled()) {
            $this->client = \PHPDaemon\Clients\Valve\Pool::getInstance();
            $this->db = \MongoClient::getInstance();
            $this->servers = $this->db->{$this->config->dbname->value . '.servers'};
        }
    }
315754
static public function initialize()
    {
        if (!self::$_instance) {
            $cn = get_called_class();
            self::$_instance = new $cn();
            self::$_instance->name = substr($cn, 0, strpos($cn, '\\'));
        }
        self::$_instance->boot();
        
        if (Rails::cli())
            Rails::console()->run();
    }
173249
function init () {

    $mdUtil.initOptionalProperties($scope, $attrs, {
      searchText: '',
      selectedItem: null,
      clearButton: false,
      disableVirtualRepeat: false,
    });

    $mdTheming($element);
    configureWatchers();
    $mdUtil.nextTick(function () {

      gatherElements();
      moveDropdown();

      // Forward all focus events to the input element when autofocus is enabled
      if ($scope.autofocus) {
        $element.on('focus', focusInputElement);
      }
      if ($scope.inputAriaDescribedBy) {
        elements.input.setAttribute('aria-describedby', $scope.inputAriaDescribedBy);
      }
      if (!$scope.floatingLabel) {
        if ($scope.inputAriaLabel) {
          elements.input.setAttribute('aria-label', $scope.inputAriaLabel);
        } else if ($scope.inputAriaLabelledBy) {
          elements.input.setAttribute('aria-labelledby', $scope.inputAriaLabelledBy);
        } else if ($scope.placeholder) {
          // If no aria-label or aria-labelledby references are defined, then just label using the
          // placeholder.
          elements.input.setAttribute('aria-label', $scope.placeholder);
        }
      }
    });
  }
100355
public static function initialize()
    {
        if (!isset($GLOBALS['_SESSION']) or !($GLOBALS['_SESSION'] instanceof self)) {
            $GLOBALS['_SESSION'] = self::getInstance();
        }

        return self::getInstance();
    }
653150
public static function initialize() {
		$paths = array_merge(
			array_filter(glob('src/*'), 'is_dir'),
			array_filter(glob('src-*/*'), 'is_dir'),
			array_filter(glob(__DIR__ . '/../../*/src/*/'), 'is_dir')
		);

		$db_params = array(
			"url" => Configuration::get("database.uri", "sqlite:///:memory:")
		);

		$cache = null;
		if(Configuration::get("database.cache", "false") == "false")
			$cache = new \Doctrine\Common\Cache\ArrayCache;

		$config = Setup::createAnnotationMetadataConfiguration($paths, Configuration::get("debug.database", "false") == "true", "cache", $cache);

		foreach(Modules::getAll() as $module)
			$config->addEntityNamespace($module->getShortName(), $module->getNamespace() . "\\Models");

		self::$entity_manager = EntityManager::create($db_params, $config);
	}
1016085
protected function _init() {
		if (!$this->connection) {
			$this->connection = new RedisCore();
		}
		$method = $this->_config['persistent'] ? 'pconnect' : 'connect';

		if (HostString::isSocket($this->_config['host'])) {
			$this->connection->{$method}($this->_config['host']);
		} else {
			$host = HostString::parse($this->_config['host']) + [
				'host' => static::DEFAULT_HOST,
				'port' => static::DEFAULT_PORT
			];
			$this->connection->{$method}($host['host'], $host['port']);
		}

		if ($this->_config['scope']) {
			$this->connection->setOption(RedisCore::OPT_PREFIX, "{$this->_config['scope']}:");
		}
	}
563838
public static function init()
    {
        if(static::$isInited)
        {
            throw new \RuntimeException('ChannelManager can not repeated init');
        }
        foreach(static::$channels as $name => $args)
        {
            static::$channels[$name] = new \Swoole\Channel(...$args);
        }
        static::$isInited = true;
    }
1032958
protected function fillScopes(){

        if($this->scopes !== null){
            return;
        }

        $this->scopes = [];

        foreach($this->treeModel->rootNodes() as $rootNode){

            $this->addToScopes($this->node2Scope($rootNode));


        }

        foreach ($this->manualScopes as $scope) {
            $this->addToScopes($scope);
        }

    }
471057
public function setScope($scope)
    {
        if ($scope !== static::UNKNOWN_VALUE) {
            $this->scope = $scope;
            // Now that we have a scope, we can actually generate code to
            // reach the variables inside the analysis.
            $this->pool->codegenHandler->setAllowCodegen(true);
        }
    }
888544
public static function _init()
	{
		\Lang::load('byte_units', true);

		static::$config     = \Config::load('num', true);
		static::$byte_units = \Lang::get('byte_units');
	}
1326235
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$serverName = (string)$baseClass->getServerName();
            static::$refererIntegrityEnabled = (bool)$baseClass->Session->RefererIntegrity->enabled;
            static::$tokenIntegrityEnabled = (bool)$baseClass->Session->TokenIntegrity->enabled;
            static::$tokenUseLooseIP = (bool)$baseClass->Session->TokenIntegrity->useLooseIP;
            static::$tokenUseHttpUserAgent = (bool)$baseClass->Session->TokenIntegrity->useHttpUserAgent;
            static::$tokenUseHttpAccept = (bool)$baseClass->Session->TokenIntegrity->useHttpAccept;
            static::$tokenUseHttpAcceptCharset = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptCharset;
            static::$tokenUseHttpAcceptEncoding = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptEncoding;
            static::$tokenUseHttpAcceptLanguage = (bool)$baseClass->Session->TokenIntegrity->useHttpAcceptLanguage;
        }
    }
310608
private static function init(): void
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$backend = (string)$baseClass->Session->Backend;
            static::$savePath = $baseClass->parsePath($baseClass->Session->SavePath);
            static::$savePath = \trim(\session_save_path()) != '' ? \session_save_path() : static::$savePath;

            Directory::create(static::$savePath);
        }
    }
292609
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            foreach ($params as $param) {
                switch ($param->getType()) {
                    case self::DOMAIN_KEY:
                        $this->setDomain($param->getValue());
                        break;
                    case self::DIR_KEY:
                        $this->setDir($this->project->resolveFile($param->getValue()));
                        break;

                    case self::LOCALE_KEY:
                        $this->setLocale($param->getValue());
                        break;
                } // switch
            }
        } // if params !== null
    }
1056621
public static function _init()
	{
		\Config::load('session', true);

		if (\Config::get('session.auto_initialize', true))
		{
			static::instance();
		}

		if (\Config::get('session.native_emulation', false))
		{
			// emulate native PHP sessions
			session_set_save_handler (
				// open
				function ($savePath, $sessionName) {
				},
				// close
				function () {
				},
				// read
				function ($sessionId) {
					// copy all existing session vars into the PHP session store
					$_SESSION = \Session::get();
					$_SESSION['__org'] = $_SESSION;
				},
				// write
				function ($sessionId, $data) {
					// get the original data
					$org = isset($_SESSION['__org']) ? $_SESSION['__org'] : array();
					unset($_SESSION['__org']);

					// do we need to remove stuff?
					if ($remove = array_diff_key($org, $_SESSION))
					{
						\Session::delete(array_keys($remove));
					}

					// add or update the remainder
					empty($_SESSION) or \Session::set($_SESSION);
				},
				// destroy
				function ($sessionId) {
					\Session::destroy();
				},
				// gc
				function ($lifetime) {
				}
			);
		}
	}