Initialising $_languageItems and $_removableLanguageSourceIds arrays.
480581
private function _initLanguageArrays()
    {
        $this->_scanningProject();

        $languageSources = LanguageSource::find()->all();

        foreach ($languageSources as $languageSource) {
            if (isset($this->_languageElements[$languageSource->category][$languageSource->message])) {
                unset($this->_languageElements[$languageSource->category][$languageSource->message]);
            } else {
                $this->_removableLanguageSourceIds[$languageSource->id] = $languageSource->id;
            }
        }
    }
431498
protected static function loadAvailableLanguages()
    {
        $matches = array();
        foreach (glob(PHPCI_DIR . 'PHPCI/Languages/lang.*.php') as $file) {
            if (preg_match('/lang\.([a-z]{2}\-?[a-z]*)\.php/', $file, $matches)) {
                self::$languages[] = $matches[1];
            }
        }
    }
950783
protected function initElements()
    {
        
        
    	parent::initElements();
    	
    	$elements = $this->form->getElements();
    	$this->form->setElements(array());
    	
    	
    	$currentLangElt = tao_helpers_form_FormFactory::getElement('current_lang', 'Textbox');
		$currentLangElt->setDescription(__('Current language'));
		$currentLangElt->setAttributes(array('readonly' => 'true'));
		$currentLangElt->setValue(\common_session_SessionManager::getSession()->getDataLanguage());	//API lang /data lang
		$this->form->addElement($currentLangElt);
		
		$dataLangElement = tao_helpers_form_FormFactory::getElement('translate_lang', 'Combobox');
		$dataLangElement->setDescription(__('Translate to'));
		$dataLangElement->setOptions(tao_helpers_I18n::getAvailableLangsByUsage(new core_kernel_classes_Resource(tao_models_classes_LanguageService::INSTANCE_LANGUAGE_USAGE_DATA)));
		$dataLangElement->setEmptyOption(__('Select a language'));
		$dataLangElement->addValidator( tao_helpers_form_FormFactory::getValidator('NotEmpty') );
		$this->form->addElement($dataLangElement);
		
		$this->form->createGroup('translation_info', __('Translation parameters'), array('current_lang', 'translate_lang'));
    	
		$dataGroup = array();
		foreach($elements as $element){
			
			if( $element instanceof tao_helpers_form_elements_Hidden ||
				$element->getName() == 'uri' || $element->getName() == 'classUri'){
					
				$this->form->addElement($element);
				
			}
			else{
				
				$propertyUri = tao_helpers_Uri::decode($element->getName());
				$property = new core_kernel_classes_Property($propertyUri);
				
				//translate only language dependent properties or Labels
				//supported widget are: Textbox, TextArea, HtmlArea
				//@todo support other widgets
				if(	( $property->isLgDependent() && 
					  ($element instanceof tao_helpers_form_elements_Textbox ||
					   $element instanceof tao_helpers_form_elements_TextArea ||
					   $element instanceof tao_helpers_form_elements_HtmlArea
					  ) ) ||
					$propertyUri == OntologyRdfs::RDFS_LABEL){
				
					$translatedElt = clone $element;
					
					$viewElt = tao_helpers_form_FormFactory::getElement('view_'.$element->getName(), 'Label');
					$viewElt->setDescription($element->getDescription());
					$viewElt->setValue($element->getValue());
					$viewElt->setAttribute('no-format', true);
					if ($element instanceof tao_helpers_form_elements_HtmlArea){
						$viewElt->setAttribute('htmlentities', false);
					}
					
					$this->form->addElement($viewElt);
					
					$dataGroup[] = $viewElt->getName();
					
					$translatedElt->setDescription(' ');
					$translatedElt->setValue('');
					if($propertyUri == OntologyRdfs::RDFS_LABEL){
						$translatedElt->setForcedValid();
					}
				
					$this->form->addElement($translatedElt);
					
					$dataGroup[] = $translatedElt->getName();
				}
			}
		}
		
		$this->form->createGroup('translation_form', __('Translate'), $dataGroup);
		
        
    }
602979
public function init($citationAsArray = false)
    {
        self::$context = new Context($this);
        self::$context->setLocale(new Locale\Locale($this->lang)); //init locale
        self::$context->setCitationsAsArray($citationAsArray);
        // set markup extensions
        self::$context->setMarkupExtension($this->markupExtension);
        $this->styleSheetXml = new SimpleXMLElement($this->styleSheet);
        $this->parse($this->styleSheetXml);
    }
31920
private void init() {
    masterLanguage = null;
    additionalRootAttrs.clear();
    // the collection is not modifiable and therefore cannot be cleared.
    additionalNamespaces = new ArrayList<>();
    textNodeList.clear();
    parseWarnings.clear();
  }
571428
protected function initElements()
    {
        parent::initElements();
        
        $elementId = tao_helpers_Uri::encode(taoItems_models_classes_ItemsService::PROPERTY_ITEM_MODEL);
        $ele = $this->form->getElement($elementId);
        $ele->feed();
        $modelUri = $ele->getEvaluatedValue();
        
        if (empty($modelUri)) {
            
            // remove deprecated models
            $statusProperty = new core_kernel_classes_Property(ItemModelStatus::CLASS_URI);
            $options = array();
            foreach ($ele->getOptions() as $optUri => $optLabel) {
                $model = new core_kernel_classes_Resource(tao_helpers_Uri::decode($optUri));
                $status = $model->getOnePropertyValue($statusProperty);
                if(!is_null($status) && $status->getUri() != ItemModelStatus::INSTANCE_DEPRECATED){
                    $options[$optUri] = $optLabel; 
                }
            }
            $ele->setOptions($options);
            if(count($options) === 1){
                reset($options);
                $ele->setValue(key($options));
            }

        } else {
            // replace radio with hidden element
            $this->form->removeElement($elementId);
            $itemModelElt = tao_helpers_form_FormFactory::getElement($elementId, 'Hidden');
            $itemModelElt->setValue($modelUri);
            $this->form->addElement($itemModelElt, true);
            
            // display model label
            $model = new core_kernel_classes_Resource($modelUri);
            $itemModelLabelElt = tao_helpers_form_FormFactory::getElement('itemModelLabel', 'Label');
            $itemModelLabelElt->setDescription(__('Item Model'));
            $itemModelLabelElt->setValue($model->getLabel());
            $this->form->addElement($itemModelLabelElt, true);
        }
    }
97826
private static function initializeResources()
    {
        if (self::$initialized)
            return;

        \Balanced\Resource::init();

        \Balanced\APIKey::init();
        \Balanced\Marketplace::init();
        \Balanced\Credit::init();
        \Balanced\Debit::init();
        \Balanced\Refund::init();
        \Balanced\Reversal::init();
        \Balanced\Card::init();
        \Balanced\BankAccount::init();
        \Balanced\BankAccountVerification::init();
        \Balanced\CardHold::init();
        \Balanced\Callback::init();
        \Balanced\Event::init();
        \Balanced\Customer::init();
        \Balanced\Order::init();
        \Balanced\Dispute::init();
        \Balanced\Account::init();
        \Balanced\Settlement::init();

        self::$initialized = true;
    }
586398
private function _initialize()
    {
        $params = $this->getParameters();
        if ($params !== null) {
            for ($i = 0, $paramsCount = count($params); $i < $paramsCount; $i++) {
                if ($params[$i] !== null) {
                    $type = $params[$i]->getType();
                    if ($type === "tokenchar") {
                        $name = $params[$i]->getName();
                        if ($name === "begintoken") {
                            $this->_beginToken = substr($params[$i]->getValue(), 0, strlen($params[$i]->getValue()));
                        } else {
                            if ($name === "endtoken") {
                                $this->_endToken = substr($params[$i]->getValue(), 0, strlen($params[$i]->getValue()));
                            }
                        }
                    } else {
                        if ($type === "token") {
                            $name = $params[$i]->getName();
                            $value = $params[$i]->getValue();

                            $tok = new Token();
                            $tok->setKey($name);
                            $tok->setValue($value);

                            $this->_tokens[] = $tok;
                        } else {
                            if ($type === "tokensource") {
                                // Store data from nested tags in local array
                                $arr = [];

                                $subparams = $params[$i]->getParams();
                                foreach ($subparams as $subparam) {
                                    $arr[$subparam->getName()] = $subparam->getValue();
                                }

                                // Create TokenSource
                                $tokensource = new TokenSource();
                                if (isset($arr["classname"])) {
                                    $tokensource->setClassname($arr["classname"]);
                                }

                                // Copy other parameters 1:1 to freshly created TokenSource
                                foreach ($arr as $key => $value) {
                                    if (strtolower($key) === "classname") {
                                        continue;
                                    }
                                    $param = $tokensource->createParam();
                                    $param->setName($key);
                                    $param->setValue($value);
                                }

                                $this->_tokensources[] = $tokensource;
                            }
                        }
                    }
                }
            }
        }
    }
510670
public function initialize()
    {
        if (!$this->isInitialized()) {
            $this->getOriginalNodeNames();
            $fetchDepth = $this->fetchDepth > 0 ? $this->fetchDepth + 1 : -1;
            $childNodes = $this->getNode($fetchDepth)->getNodes($this->filter);
            $this->collection = new ArrayCollection($this->getChildren($childNodes));
            $this->initialized = self::INITIALIZED_FROM_PHPCR;
        }
    }
529236
public function initElements()
    {

    	$itemService = taoItems_models_classes_ItemsService::singleton();

		$fileName = '';
    	$options = array();
    	if(isset($this->data['instance'])){
    		$item = $this->data['instance'];
            if($item instanceof core_kernel_classes_Resource)
            {
                if($itemService->hasItemModel($item, array(OwiItemModel::ITEMMODEL_URI))){
    				$fileName = strtolower(tao_helpers_Display::textCleaner($item->getLabel()));
    				$options[$item->getUri()] = $item->getLabel();
    			}
    		}
    	}
    	else {
    		if(isset($this->data['class'])){
	    		$class = $this->data['class'];
	    	}
	    	else{
	    		$class = $itemService->getRootClass();
	    	}
    		if($class instanceof core_kernel_classes_Class){
                    $fileName =  strtolower(tao_helpers_Display::textCleaner($class->getLabel(), '*'));
                    foreach($class->getInstances() as $instance){
                        if($itemService->hasItemModel($instance, array(OwiItemModel::ITEMMODEL_URI)) && $itemService->hasItemContent($instance)){
                            $options[$instance->getUri()] = $instance->getLabel();
                        }
                    }
    		}
    	}

		$nameElt = tao_helpers_form_FormFactory::getElement('filename', 'Textbox');
		$nameElt->setDescription(__('File name'));
		$nameElt->setValue($fileName);
		$nameElt->setUnit(".zip");
		$nameElt->addValidator(tao_helpers_form_FormFactory::getValidator('NotEmpty'));
    	$this->form->addElement($nameElt);

    	$instanceElt = tao_helpers_form_FormFactory::getElement('exportInstance', 'Radiobox');
    	$instanceElt->setDescription(__('Items'));
    	$instanceElt->setAttribute('checkAll', true);
		$instanceElt->setOptions(tao_helpers_Uri::encodeArray($options, tao_helpers_Uri::ENCODE_ARRAY_KEYS));
    	$instanceElt->setValue(current(array_keys($options)));
			
		$this->form->addElement($instanceElt);


    	$this->form->createGroup('options', __('Export an Open Web Item'), array('filename', 'exportInstance'));
    }
81759
public void initialize(Language language, String treeTaggerHome, Boolean annotateTokens, 
			Boolean annotateSentences, Boolean annotatePartOfSpeech, Boolean improveGermanSentences) {
		this.initialize(language, treeTaggerHome, annotateTokens, annotateSentences, annotatePartOfSpeech,
				improveGermanSentences, null);
	}
1031361
protected function initializeResouces()
    {
        $this->resources = array();

        // Build resources array, without constructing the objects yet, for
        // lazy construction of the object tree.
        $contents = dir($this->root . $this->path);
        while (($path = $contents->read()) !== false) {
            // Also mind svn:ignore here?
            if (($path === '.') ||
                 ($path === '..') ||
                 ($path === '.svn'))
            {
                continue;
            }

            $this->resources[] = (is_dir($this->root . $this->path . $path) ?
                new \Arbit\VCSWrapper\SvnCli\Directory($this->root, $this->path . $path . '/', $this->username, $this->password) :
                new \Arbit\VCSWrapper\SvnCli\File($this->root, $this->path . $path, $this->username, $this->password)
            );
        }
        $contents->close();
    }
448201
def _collapse_language_array(language_array):
        
        language_dict = {}
        for language in language_array.item:
            key = language.key[0]
            value = language.value[0]
            language_dict[key] = value

        return language_dict
1214445
private function initialize() {
        $CI = get_instance();
        $CI->config->load('dwootemplate', TRUE);
        $config = $CI->config->item('dwootemplate');
        foreach ($config as $key => $val) {
                $this->$key = $val;
        }
    }
1295140
protected function init()
	{
	    // language load lang
	    Ioc::language()->setLocale(Config::get('lang'));
	    Ioc::language()->load('common');
	    
	    // errorHandler register
	    Ioc::errorHandler()->register();
	    
	    if ($components = Config::get('components')) {
	        foreach ($components as $key => $def) {
	            Ioc::container()->setShared($key, $def);
	        }
	    }
	}
375791
public function init()
	{
		$languages = Yii::app()->getLanguages();
		$activeLocale = Yii::app()->language;

		$items = array(array('label'=>'Language'));

		foreach ($languages as $locale => $language)
		{
			if ($locale === $activeLocale)
				$activeLanguage = $language;

			$items[] = array(
				'label' => $language,
				'url' => array('/site/changeLanguage', 'locale'=>$locale),
				'active' => $locale === $activeLocale,
			);
		}

		$label = isset($activeLanguage) ? $activeLanguage : 'Unknown';
		$this->items = array_merge(array(array('label'=> $label, 'items'=>$items)), $this->items);

		parent::init();
	}
649406
protected function initItems()
	{
		$initItems = null;
		
		if ($this->items != null)
		{
			foreach ($this->items as $item)
			{
				if (isset($item['value']))
				{
					$i = $item['value'];
					unset($item['value']);
					$initItems[$i] = $item;
				}
				else 
				{
					$initItems = $this->items;	
				}
			}
			
			$this->items = array_replace($this->defaults, $initItems);
		}
		else 
		{
			$this->items = $this->defaults;
		}
	}