/*!
\static
Initialize the bork translator if this is not allready done.
10376
static function initialize()
    {
        if ( !isset( $GLOBALS['eZ1337Translator'] ) ||
             !( $GLOBALS['eZ1337Translator'] instanceof eZ1337Translator ) )
        {
            $GLOBALS['eZ1337Translator'] = new eZ1337Translator();
        }

        $man = eZTranslatorManager::instance();
        $man->registerHandler( $GLOBALS['eZ1337Translator'] );
        return $GLOBALS['eZ1337Translator'];
    }
1133992
public static function initialize()
    {
        if (static::$isConfigurationLoaded === true) {
            return;
        }
        
        foreach (static::$handlers as $handler) {
            EventManager::getInstance()->addEventHandler($handler[0], $handler[1], $handler[2], $handler[3]);
        }

        static::$isConfigurationLoaded = true;
    }
371209
private static function init(): void
    {
        if (static::$initialized === false) {
            $baseClass = Base::getInstance();

            static::$initialized = true;
            static::$logDir = $baseClass->parsePath((string)$baseClass->Log->logDirectory);
            static::$classConfig = $baseClass->Log->classConfig->toArray();

            if (static::$logDir != '') {
                Directory::create(static::$logDir);
            }
        }
    }
1318438
protected function init()
    {
        if (null === $this->items) {
            list($constraints, $sorting, $joins) = $this->translate($this->filter, $this->sorting);

            if (empty($constraints)) {
                $constraints = '';
            } else {
                $constraints = ' WHERE ' . implode(' AND ', $constraints);
            }

            if ($this->prefetch) {
                $this->initEntities($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            } else {
                $this->initKeys($constraints, $this->makeJoins($joins), $this->makeOrderBy($sorting, $joins));
            }

            $this->rewind();
        }
    }
1246898
function initializeObjectAttribute( $contentObjectAttribute, $currentVersion, $originalContentObjectAttribute )
    {
        if ( $currentVersion != false )
        {
            $originalContentObjectAttributeID = $originalContentObjectAttribute->attribute( 'id' );
            $contentObjectAttributeID = $contentObjectAttribute->attribute( 'id' );

            // if translating or copying an object
            if ( $originalContentObjectAttributeID != $contentObjectAttributeID )
            {
                // copy keywords links as well
                $keyword = $originalContentObjectAttribute->content();
                if ( is_object( $keyword ) )
                {
                    $keyword->store( $contentObjectAttribute );
                }
            }
        }
    }
1280586
private static function init()
    {
        if (!static::$initialized) {
            $baseClass = Base::getInstance();
            static::$initialized = true;
            static::$tagsData = $baseClass->Html->Tags;
        }
    }
640402
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $paramsCount = count($params); $i < $paramsCount; $i++) {
                if (self::REGEXP_KEY === $params[$i]->getType()) {
                    $pattern = $params[$i]->getValue();
                    $regexp = new RegularExpression();
                    $regexp->setPattern($pattern);
                    $this->_regexps[] = $regexp;
                } elseif (self::NEGATE_KEY === $params[$i]->getType()) {
                    $this->setNegate(Project::toBoolean($params[$i]->getValue()));
                } elseif (self::CS_KEY === $params[$i]->getType()) {
                    $this->setCaseSensitive(Project::toBoolean($params[$i]->getValue()));
                }
            }
        }
    }
726140
private static function init()
    {
        if (!self::$defaultLng) {
            $config = Application::getConfigManager()->loadForModule('Cmf\Language');
            self::$defaultLng = strtolower($config->defaultLanguage);
            $currentLng = $config->currentLanguage;
            self::$currentLng = $currentLng ? strtolower($currentLng) : strtolower($config->defaultLanguage);
        }
    }
314859
public static function initialize() {

		$instance = new static();

		/**
		 * Fires right before hook listeners are registered.
		 *
		 * @param HookListenersRegistry $registry
		 */
		do_action( self::ACTION_REGISTER, $instance );

		array_walk(
			$instance->listeners,
			function ( HookListenerInterface $listener ) use ( $instance ) {

				/**
				 * Filters whether to enable the hook listener.
				 *
				 * @param bool                  $enable
				 * @param HookListenerInterface $listener
				 */
				if ( apply_filters( self::FILTER_ENABLED, TRUE, $listener ) ) {
					$hooks = (array) $listener->listen_to();
					array_walk( $hooks, [ $instance, 'listen_hook' ], $listener );
				}
			}
		);

		unset( $instance->listeners );
		$instance->listeners = [];
	}
348950
private function init()
    {
        $this->nb_response = new CNabuHTTPResponse($this->nb_plugins_manager, $this);

        $this->nb_site = null;
        $this->nb_site_alias = null;
        $this->nb_site_target = null;
        $this->nb_language = null;

        $this->user_remote_ip = null;
        $this->user_agent = null;
        $this->accept_mimetypes = null;
        $this->accept_languages = null;
        $this->method = null;

        $this->secure = false;
        $this->zone = null;

        $this->page_uri = null;

        $this->variables = array();

        // This block is intended for XDR IE8 & IE9 compatibility
        /*
        if (count($_POST) === 0) {
            if (isset($HTTP_RAW_POST_DATA)) {
                parse_str($HTTP_RAW_POST_DATA, $this->xdr_post);
            } else {
                parse_str(file_get_contents('php://input'), $this->xdr_post);
            }
        }
        */
    }
888544
public static function _init()
	{
		\Lang::load('byte_units', true);

		static::$config     = \Config::load('num', true);
		static::$byte_units = \Lang::get('byte_units');
	}
676735
public function initTransforms()
    {
        $this->projection = new Proj4php::$proj[$this->projName];
        Proj4php::extend($this->projection, $this);

        // initiate depending class (tidy up this condition)
        if (
            false !== ($dependsOn = isset($this->projection->dependsOn) && !empty($this->projection->dependsOn) ? $this->projection->dependsOn : false)
        ) {
            Proj4php::extend(Proj4php::$proj[$dependsOn], $this->projection);
            Proj4php::$proj[$dependsOn]->init();
            Proj4php::extend($this->projection, Proj4php::$proj[$dependsOn]);
        }

        $this->init();
        $this->readyToUse = true;
    }
484906
public function initialize() {
        if (!$this->isEnabled()) {
            return;
        }

        $current = null;

        // Determine via cookie
        if (!empty($_COOKIE['locale']) && isset($this->_locales[$_COOKIE['locale']])) {
            $current = $_COOKIE['locale'];

        // Determine locale based on HTTP headers
        } else if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
            $header = mb_strtolower($_SERVER['HTTP_ACCEPT_LANGUAGE']);

            if (mb_strpos($header, ';') !== false) {
                $header = mb_strstr($header, ';', true);
            }

            $header = explode(',', $header);

            if (count($header) > 0) {
                foreach ($header as $key) {
                    if (isset($this->_locales[$key])) {
                        $current = $key;
                        break;
                    }
                }
            }
        }

        // Set current to the fallback if none found
        if ($current === null) {
            $current = $this->_fallback->getCode();
        }

        // Check for a translator
        if (!$this->_translator) {
            throw new MissingTranslatorException('A translator is required for G11n message parsing');
        }

        $this->emit('g11n.onInit', [$this, &$current]);

        // Apply the locale
        $this->useLocale($current);
    }
327941
public void init(Converter converter, Converter converterAlt)
    {
        m_bEnableTranslation = true;
        m_bSetData = false;
        super.init(converter);
        if (converterAlt != null)
            this.addConverterToPass(converterAlt);
    }
471794
public function initialize()
    {
        if (!$this->isInitialized()) {
            $uow = $this->dm->getUnitOfWork();

            $referrerDocuments = [];
            $referrerProperties = $this->getReferrerProperties();
            $referringNodes = [];
            foreach ($referrerProperties as $prop) {
                $referringNodes[] = $prop->getParent();
            }
            $locale = $this->locale ?: $uow->getCurrentLocale($this->document);

            $uow->getPrefetchHelper()->prefetch($this->dm, $referringNodes, $locale);

            $this->originalReferrerPaths = [];
            foreach ($referrerProperties as $referrerProperty) {
                $referrerNode = $referrerProperty->getParent();
                $document = $uow->getOrCreateProxyFromNode($referrerNode, $locale);
                if (!$this->refClass || $document instanceof $this->refClass) {
                    $referrerDocuments[] = $document;
                    $this->originalReferrerPaths[] = $referrerNode->getPath();
                }
            }

            $this->collection = new ArrayCollection($referrerDocuments);
            $this->initialized = self::INITIALIZED_FROM_PHPCR;
        }
    }
1007811
public static function _init()
	{
		logger(\Fuel::L_DEBUG, 'Migrate class initialized');

		// load the migrations config
		\Config::load('migrations', true);

		// set the name of the table containing the installed migrations
		static::$table = \Config::get('migrations.table', static::$table);

		// set the name of the connection group to use
		static::$connection = \Config::get('migrations.connection', static::$connection);

		// installs or upgrades the migration table to the current schema
		static::table_version_check();

		//get all installed migrations from db
		$migrations = \DB::select()
			->from(static::$table)
			->order_by('type', 'ASC')
			->order_by('name', 'ASC')
			->order_by('migration', 'ASC')
			->execute(static::$connection)
			->as_array();

		// convert the db migrations to match the config file structure
		foreach($migrations as $migration)
		{
			isset(static::$migrations[$migration['type']]) or static::$migrations[$migration['type']] = array();
			static::$migrations[$migration['type']][$migration['name']][] = $migration['migration'];
		}
	}
878905
static function init(&$arr, $key, $default = null) 
    {
        if (! isset($arr[$key])) {
            $arr[$key] = $default;
        }
        return $arr[$key];
    }