-----------------------------------------------------------------------------
971768
public function criteriaSummaryDisplay()
    {
        $text = "";

        $type = $this->criteria_display;

        $value_string = "";

        $params = array();
        $manual_params = array();
        $hidden_params = array();
        $expanded_params = array();
        $manual_override = false;

        if (ReporticoUtility::getRequestItem("MANUAL_" . $this->query_name . "_FROMDATE", "")) {
            $this->criteria_summary = ReporticoUtility::getRequestItem("MANUAL_" . $this->query_name . "_FROMDATE", "");
            if (ReporticoUtility::getRequestItem("MANUAL_" . $this->query_name . "_TODATE", "")) {
                $this->criteria_summary .= "-";
                $this->criteria_summary .= ReporticoUtility::getRequestItem("MANUAL_" . $this->query_name . "_TODATE");
            }
            return;
        }

        if (ReporticoUtility::getRequestItem("HIDDEN_" . $this->query_name . "_FROMDATE", "")) {
            $this->criteria_summary = ReporticoUtility::getRequestItem("HIDDEN_" . $this->query_name . "_FROMDATE", "");
            if (ReporticoUtility::getRequestItem("HIDDEN_" . $this->query_name . "_TODATE", "")) {
                $this->criteria_summary .= "-";
                $this->criteria_summary .= ReporticoUtility::getRequestItem("HIDDEN_" . $this->query_name . "_TODATE");
            }
            return;
        }

        if (!array_key_exists("EXPANDED_" . $this->query_name, $_REQUEST)) {
            if (array_key_exists($this->query_name, $_REQUEST)) {
                $params = $_REQUEST[$this->query_name];
                if (!is_array($params)) {
                    $params = array($params);
                }

            }
        }

        $hidden_params = array();
        if (!array_key_exists("EXPANDED_" . $this->query_name, $_REQUEST)) {
            if (array_key_exists("HIDDEN_" . $this->query_name, $_REQUEST)) {
                $hidden_params = $_REQUEST["HIDDEN_" . $this->query_name];
                if (!is_array($hidden_params)) {
                    $hidden_params = array($hidden_params);
                }

            }
        }

        $manual_params = array();
        if (!array_key_exists("EXPANDED_" . $this->query_name, $_REQUEST)) {
            if (array_key_exists("MANUAL_" . $this->query_name, $_REQUEST)) {
                $manual_params = explode(',', $_REQUEST["MANUAL_" . $this->query_name]);
                if ($manual_params) {
                    $hidden_params = $manual_params;
                    $manual_override = true;
                    $value_string = $_REQUEST["MANUAL_" . $this->query_name];
                }
            }
        }

        $expanded_params = array();
        if (array_key_exists("EXPANDED_" . $this->query_name, $_REQUEST)) {
            $expanded_params = $_REQUEST["EXPANDED_" . $this->query_name];
            if (!is_array($expanded_params)) {
                $expanded_params = array($expanded_params);
            }

        }

        if ($this->criteria_type == "LIST") {
            $checkedct = 0;
            $res = &$this->list_values;
            $text = "";
            if (!$res) {
                $text = "";
            } else {
                reset($res);
                $k = key($res);
                for ($i = 0; $i < count($res); $i++) {
                    $line = &$res[$i];
                    $lab = $res[$i]["label"];
                    $ret = $res[$i]["value"];
                    $checked = false;

                    if (in_array($ret, $params)) {
                        $checked = true;
                    }

                    if (in_array($ret, $hidden_params)) {
                        $checked = true;
                    }

                    if (in_array($ret, $expanded_params)) {
                        $checked = true;
                    }

                    if ($checked) {
                        if ($checkedct++) {
                            $text .= ",";
                        }

                        $text .= $lab;
                    }
                }
                $this->criteria_summary = $text;
                return;
            }
        }

        $txt = "";
        $res = &$this->lookup_query->targets[0]->results;
        if (!$res) {
            $res = array();
            $k = 0;
        } else {
            reset($res);
            $k = key($res);
            $checkedct = 0;
            for ($i = 0; $i < count($res[$k]); $i++) {
                $line = &$res[$i];
                foreach ($this->lookup_query->columns as $ky => $col) {
                    if ($col->lookup_display_flag) {
                        $lab = $res[$col->query_name][$i];
                    }
                    if ($col->lookup_return_flag) {
                        $ret = $res[$col->query_name][$i];
                    }

                    if ($col->lookup_abbrev_flag) {
                        $abb = $res[$col->query_name][$i];
                    }

                }
                $checked = false;

                if (in_array($ret, $params)) {
                    $checked = true;
                }

                if (in_array($ret, $hidden_params) && !$manual_override) {
                    $checked = true;
                }

                if (in_array($ret, $expanded_params)) {
                    $checked = true;
                }

                if (in_array($abb, $hidden_params) && $manual_override) {
                    $checked = true;
                }

                if ($checked) {
                    if ($checkedct++) {
                        $text .= ",";
                    }

                    $text .= $lab;
                }
            }
        }

        if (array_key_exists("EXPAND_" . $this->query_name, $_REQUEST) ||
            array_key_exists("EXPANDCLEAR_" . $this->query_name, $_REQUEST) ||
            array_key_exists("EXPANDSELECTALL_" . $this->query_name, $_REQUEST) ||
            array_key_exists("EXPANDSEARCH_" . $this->query_name, $_REQUEST) ||
            $this->criteria_display == "NOINPUT") {
            $tag = $value_string;
            if (strlen($tag) > 40) {
                $tag = substr($tag, 0, 40) . "...";
            }

            if (!$tag) {
                $tag = "ANY";
            }

            $text .= $tag;
        } else if ($this->criteria_display == "ANYCHAR" || $this->criteria_display == "TEXTFIELD") {
            $txt = $value_string;
        }

        $this->criteria_summary = $text;
    }
228964
public function initialize()
    {
        $this->data = new stdClass();
        $this->data->type = null;
        $this->data->createdAt = null;
        $this->data->descriotion = null;
    }
289324
public function initialize()
    {
        $this->where  = new WhereClause($this);
        $this->order  = new OrderClause($this);
        $this->limit  = new LimitClause($this);
        $this->joins  = new JoinClause($this);
    }
439901
public function initializeObject()
    {
        if ($this->cache->has('fractions')) {
            $this->fractions = $this->cache->get('fractions');
        } else {
            $this->generateFractions();
            $this->cache->set('fractions', $this->fractions);
        }
    }
1178516
public function next(): void
    {
        $innerIterator = $this->getInnerIterator();
        $this->valid = $innerIterator->valid();

        if ($this->valid === false) {
            return;
        }

        $this->key = $innerIterator->key();
        $this->current = $innerIterator->current();

        $innerIterator->next();
    }
617827
public function initialize()
    {
        if ($this->isInitialize) {
            return ;
        }

        $this->isInitialize = true;

        $this->getEventManager()->trigger(self::EVENT_INITIALIZE, $this);
    }
1058597
function () {
        while (this.head !== null) {
            var temp = this.head;
            this.head = this.head.next();   // use next() the instead of "_next", otherwise it will loop forever
            temp._list = null;
            temp._next = null;
            temp._prev = null;
        }

        this.head = null;
        this.size = 0;
    }
769814
public function init()
	{
		if (!isset($this->htmlOptions['class']))
			$this->htmlOptions['class'] = 'form-' . $this->type;
		else
			$this->htmlOptions['class'] .= ' form-' . $this->type;

		if (!isset($this->inlineErrors))
			$this->inlineErrors = $this->type === self::TYPE_HORIZONTAL;

		if ($this->inlineErrors)
			$this->errorMessageCssClass = 'help-inline error';
		else
			$this->errorMessageCssClass = 'help-block error';

		parent::init();
	}
683787
public function initialize()
    {
        if ($this->all()->count() < 1) {
            return;
        }

        $this->all()->each(function (ActionInterface $action) {
            $action->initialize();
        });

        $this->setHtmlAttribute('data-type', 'display-actions');

        if (! $this->hasHtmlAttribute('class')) {
            $this->setHtmlAttribute('class', 'panel-footer');
        }
    }
1024039
public function initializeObject()
    {
        if ($this->cache->has('rulesets') && $this->cache->has('rulesetsIndices')) {
            $this->rulesets = $this->cache->get('rulesets');
            $this->rulesetsIndices = $this->cache->get('rulesetsIndices');
        } else {
            $this->generateRulesets();
            $this->cache->set('rulesets', $this->rulesets);
            $this->cache->set('rulesetsIndices', $this->rulesetsIndices);
        }
    }
1043875
public function persistData()
    {
        $handlers = $this->getHandlers();

        foreach ($handlers as $handler) {
            /** @var $handler \Wurfl\Handlers\AbstractHandler */
            $handler->setLogger($this->logger);

            $handler->persistData();
        }
    }
496591
public function initializeObject()
    {
        if ($this->cache->has('parsedFormats') && $this->cache->has('parsedFormatsIndices') && $this->cache->has('localizedLiterals')) {
            $this->parsedFormats = $this->cache->get('parsedFormats');
            $this->parsedFormatsIndices = $this->cache->get('parsedFormatsIndices');
            $this->localizedLiterals = $this->cache->get('localizedLiterals');
        }
    }
132156
public function initialize()
    {
        if ($this->initialized === false) {
            $this->data = $this->cursor->toArray();
        }
        $this->initialized = true;
    }
1315126
public function onBeforeWrite()
    {
        $owner = $this->owner;
        if(!$owner->ID && !$owner->SubsiteID){
            $owner->SubsiteID = Subsite::currentSubsiteID();
        }
        parent::onBeforeWrite();
    }
367409
private void onEnd()
   {
      long result = System.currentTimeMillis() - currentTime.get().poll();
      times.incrementAndGet();
      if (result < min.get())
      {
         min.set(result);
      }
      if (max.get() < result)
      {
         max.set(result);
      }
      total.addAndGet(result);
   }
763322
public function afterFind()
    {
        /** @var ActiveRecord $owner */
        $owner = $this->owner;

        if ($owner->isRelationPopulated('translations') && $related = $owner->getRelatedRecords()['translations']) {
            $translations = $this->indexByLanguage($related);
            foreach ($this->_languageKeys as $language) {
                foreach ($this->attributes as $attribute) {
                    foreach ($translations as $translation) {
                        if ($translation->{$this->languageField} == $language) {
                            $attributeName = $this->localizedPrefix . $attribute;
                            $this->setMultilingualAttribute($this->getAttributeName($attribute, $language), $translation->{$attributeName});
                        }
                    }
                }
            }
        } else if ($owner->getAttribute($this->_ownerPrimaryKey) !== null) {
            if (!$owner->isRelationPopulated('translation')) {
                $owner->translation;
            }

            $translation = $owner->getRelatedRecords()['translation'];
            if ($translation) {
                foreach ($this->attributes as $attribute) {
                    $attribute_name = $this->localizedPrefix . $attribute;
                    $owner->setMultilingualAttribute($attribute, $translation->$attribute_name);
                }
            }
        }

        foreach ($this->attributes as $attribute) {
            if ($owner->hasAttribute($attribute) && $this->getMultilingualAttribute($attribute)) {
                $owner->setAttribute($attribute, $this->getMultilingualAttribute($attribute));
            }
        }
    }
759689
public function init()
    {
        $this->renameTableQueries = array();
        $this->dropCheckQueries = array();
        $this->dropForeignKeyQueries = array();
        $this->dropIndexQueries = array();
        $this->dropPrimaryKeyQueries = array();
        $this->dropColumnQueries = array();
        $this->alterColumnQueries = array();
        $this->createColumnQueries = array();
        $this->createPrimaryKeyQueries = array();
        $this->createIndexQueries = array();
        $this->createForeignKeyQueries = array();
        $this->createCheckQueries = array();
    }