/*
********************************************************
/* Internal methods
********************************************************
192124
protected Reader _createReader(InputStream in, JsonEncoding enc, IOContext ctxt) throws IOException
    {
        if (enc == null) {
            enc = JsonEncoding.UTF8;
        }
        // default to UTF-8 if encoding missing
        if (enc == JsonEncoding.UTF8) {
            boolean autoClose = ctxt.isResourceManaged() || isEnabled(JsonParser.Feature.AUTO_CLOSE_SOURCE);
            return new UTF8Reader(in, autoClose);
        }
        return new InputStreamReader(in, enc.getJavaName());
    }
36452
public function setReadOnly()
    {
        $this->allowModifications = false;

        /** @var Config $value */
        foreach ($this->data as $value) {
            if ($value instanceof self) {
                $value->setReadOnly();
            }
        }
    }
1270086
private void init() throws IOException {
    Map<String, Integer> minDays = null;
    Map<String, Integer> firstDays = null;

    loadPatches();
    
    List<Path> resources = Utils.listResources(FILES);
    sanityCheck(resources);
    for (Path path : resources) {
      String fileName = path.getFileName().toString();
      if (!fileName.endsWith(".json")) {
        continue;
      }

      JsonObject root = load(path);
      switch (fileName) {

        case "aliases.json":
        {
          parseTimeZoneAliases(root);
          parseLanguageAliases(root);
          parseTerritoryAliases(root);
          break;
        }
        
        case "availableLocales.json":
          JsonObject locales = resolve(root, "availableLocales");
          for (JsonElement elem : locales.getAsJsonArray("modern")) {
            availableLocales.add(elem.getAsString());
          }
          break;

        case "ca-gregorian.json":
        {
          String code = localeCode(root);
          LocaleID id = parseIdentity(code, root);
          root = resolve(root, "main", code);
          DateTimeData data = parseCalendar(root);
          data.id = id;
          calendars.put(id, data);
          break;
        }

        case "currencies.json":
        {
          String code = localeCode(root);
          LocaleID id = parseIdentity(code, root);
          root = resolve(root, "main", code);
          parseCurrencyData(id, code, root);
          break;
        }

        case "currencyData.json":
          parseSupplementalCurrencyData(root);
          break;

        case "defaultContent.json":
          parseDefaultContent(root);
          break;
          
        case "languageMatching-fix.json":
        {
          parseLanguageMatchingFix(root);
          break;
        }
        
        case "likelySubtags.json":
          parseLikelySubtags(root);
          break;

        case "metaZones.json":
        {
          parseMetaZones(root);
          break;
        }
          
        case "numbers.json":
        {
          String code = localeCode(root);
          root = patch(fileName, code, root);
          LocaleID id = parseIdentity(code, root);
          root = resolve(root, "main", code);
          parseNumberData(id, code, root);
          break;
        }

        case "ordinals.json":
          parsePlurals(root, "plurals-type-ordinal", ordinals);
          break;

        case "plurals.json":
          parsePlurals(root, "plurals-type-cardinal", cardinals);
          break;

        case "territoryContainment.json":
        {
          parseTerritoryContainment(root);
          break;
        }
          
        case "timeZoneNames.json":
        {
          String code = localeCode(root);
          LocaleID id = parseIdentity(code, root);
          TimeZoneData data = parseTimeZoneData(code, root);
          timezones.put(id, data);
          break;
        }
        
        case "units.json":
        {
          String code = localeCode(root);
          LocaleID id = parseIdentity(code, root);
          UnitData data = parseUnitData(code, root);
          units.put(id, data);
          break;
        }
        
        case "weekData.json":
          minDays = parseMinDays(root);
          firstDays = parseFirstDays(root);
          break;
      }
    }
    
    Integer defaultFirstDay = firstDays.get("001");
    Integer defaultMinDays = minDays.get("001");

    for (Map.Entry<LocaleID, DateTimeData> entry : calendars.entrySet()) {
      String territory = entry.getKey().territory;
      DateTimeData data = entry.getValue();

      Integer value = minDays.getOrDefault(territory, defaultMinDays);
      data.minDays = value;

      value = firstDays.getOrDefault(territory, defaultFirstDay);
      data.firstDay = value - 1;
    }
  }
70044
public function init()
    {
        $this->processShareData();

        $this->_data = ArrayHelper::merge([
            '{url}'         => $this->url,
            '{title}'       => $this->title,
            '{description}' => $this->description,
            '{imageUrl}'    => $this->imageUrl,
        ], $this->_data);

        $metaTags = $this->getMetaTags();

        if ($this->registerMetaTags && !empty($metaTags)) {
            $rawData = static::decodeData($this->_data);
            $view = Yii::$app->getView();

            foreach ($metaTags as $metaTag) {
                $metaTag['content'] = \strtr($metaTag['content'], $rawData);
                $view->registerMetaTag($metaTag, \md5(\implode(';', $metaTag)));
            }
        }
    }
118654
function Internal(message, code_id) {
    Error.call(this);
    this.message = message || "internal error";
    this.code_id = code_id || null;
    this.statusCode = 500;
}
139432
public function initialize()
    {

        $this->id = null;
        $this->recordId = null;
        $this->toolProxy = null;
        $this->created = null;
        $this->updated = null;

    }
1179683
private function _initialize()
    {
        $params = $this->getParameters();
        $n = count($params);

        if ($params !== null) {
            for ($i = 0; $i < $n; $i++) {
                if ($params[$i] !== null) {
                    $name = $params[$i]->getName();
                    switch ($name) {
                        case 'begintoken':
                            $this->_beginToken = $params[$i]->getValue();
                            break;
                        case 'endtoken':
                            $this->_endToken = $params[$i]->getValue();
                            break;
                        case 'dir':
                            $this->_dir = $params[$i]->getValue();
                            break;
                        case 'prefix':
                            $this->_prefix = $params[$i]->getValue();
                            break;
                        case 'postfix':
                            $this->_postfix = $params[$i]->getValue();
                            break;
                        case 'translatehtml':
                            $this->_translatehtml = $params[$i]->getValue();
                            break;
                    }
                }
            }
        }
    }
184752
public function compile()
    {
        if (null !== $this->parameterBag) {
            $blocks = $this->getCoreBlocks();
            $blocks = array_merge($blocks, $this->getThirdPartyBlocks());
            foreach ($blocks as $block) {
                $this->prepareBlock($block);
            }
        }

        Config::read($this);

        parent::compile();
    }
1093354
public function execute()
    {
        /** @var EventHandler $eventHandler */
        $eventHandler = $this->make(EventHandler::class);
        $eventHandler->trigger(BeforeExecute::class);

        /** @var Request $request */
        $request = $this->make(Request::class);
        $request->compute();
    }
536938
public function initialize()
    {

        $this->length = null;
        $this->life = null;
        $this->autoApprove = false;
        $this->expires = null;

    }
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();
    }
603920
protected function initData()
    {
        if ($this->data !== null) {
            return;
        }

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

        if ($this->model instanceof Model) {
            $data = ($this->model->hasProperty($this->attribute) || isset($this->model->{$this->attribute}))
                ? ArrayHelper::getValue($this->model, $this->attribute, [])
                : [];

            if (!is_array($data) && empty($data)) {
                return;
            }

            if (!($data instanceof \Traversable)) {
                $data = (array) $data;
            }

            foreach ($data as $index => $value) {
                $this->data[$index] = $value;
            }
        }
    }
163931
public function initialize()
    {
        parent::initialize();
        $this->select = new SelectClause($this);
        $this->from   = new FromClause($this);
        $this->group  = new GroupClause($this);
    }
1347636
private void initData(String x, int minsize, int maxsize) {
        content = null;
        setContent(x, minsize, maxsize);
    }
1069542
public function init() {
		$this->normalizeData();

		$this->normalizeOptions();

		$this->addEmptyItemIfPlaceholderDefined();

		$this->setDefaultWidthIfEmpty();

		// disabled & readonly
		if (!empty($this->htmlOptions['readonly'])) {
			$this->readonly = true;
		}
		if (!empty($this->htmlOptions['disabled'])) {
			$this->disabled = true;
		}
	}
132156
public function initialize()
    {
        if ($this->initialized === false) {
            $this->data = $this->cursor->toArray();
        }
        $this->initialized = true;
    }
348652
public function initialize()
    {
        parent::initialize();

        if ('xml' === Configure::read('ApiRequest.responseType')) {
            $this->response->withType('xml');
            $this->_responseLayout = 'xml_error';
        } else {
            $this->response->withType('json');
        }
    }