initializeConverterHolder

@see SessionBuilder
322333
protected function initializeConverterHolder(ConverterHolder $converter_holder)
    {
        $converter_holder
            ->registerConverter('Array', new Converter\PgArray(), ['array'], false)
            ->registerConverter(
                'Boolean',
                new Converter\PgBoolean(),
                [
                    'bool',
                    'pg_catalog.bool',
                    'boolean',
                ],
                false
            )
            ->registerConverter(
                'Number',
                new Converter\PgNumber(),
                [
                    'int2', 'pg_catalog.int2',
                    'int4', 'pg_catalog.int4', 'int', 'integer',
                    'int8', 'pg_catalog.int8',
                    'numeric', 'pg_catalog.numeric',
                    'float4', 'pg_catalog.float4', 'float',
                    'float8', 'pg_catalog.float8',
                    'oid', 'pg_catalog.oid',
                ],
                false
            )
            ->registerConverter(
                'String',
                new Converter\PgString(),
                [
                    'varchar', 'pg_catalog.varchar',
                    'char', 'pg_catalog.char',
                    'text', 'pg_catalog.text',
                    'citext', 'public.citext',
                    'uuid', 'pg_catalog.uuid',
                    'tsvector', 'pg_catalog.tsvector',
                    'xml', 'pg_catalog.xml',
                    'bpchar', 'pg_catalog.bpchar',
                    'name', 'pg_catalog.name',
                    'character varying',
                    'regclass', 'pg_catalog.regclass',
                    'regproc', 'pg_catalog.regproc',
                    'regprocedure', 'pg_catalog.regprocedure',
                    'regoper', 'pg_catalog.regoper',
                    'regoperator', 'pg_catalog.regoperator',
                    'regtype', 'pg_catalog.regtype',
                    'regrole', 'pg_catalog.regrole',
                    'regnamespace', 'pg_catalog.regnamespace',
                    'regconfig', 'pg_catalog.regconfig',
                    'regdictionary', 'pg_catalog.regdictionary',
                    'inet', 'pg_catalog.inet',
                    'cidr', 'pg_catalog.cidr',
                    'macaddr', 'pg_catalog.macaddr',
                ],
                false
            )
            ->registerConverter(
                'Timestamp',
                new Converter\PgTimestamp(),
                [
                    'timestamp', 'pg_catalog.timestamp',
                    'date', 'pg_catalog.date',
                    'time', 'pg_catalog.time',
                    'timestamptz', 'pg_catalog.timestamptz',
                ],
                false
            )
            ->registerConverter('Interval', new Converter\PgInterval(), ['interval', 'pg_catalog.interval'], false)
            ->registerConverter('Binary', new Converter\PgBytea(), ['bytea', 'pg_catalog.bytea'], false)
            ->registerConverter('Point', new Converter\Geometry\PgPoint(), ['point', 'pg_catalog.point'], false)
            ->registerConverter('Circle', new Converter\Geometry\PgCircle(), ['circle', 'pg_catalog.circle'], false)
            ->registerConverter('Box', new Converter\Geometry\PgBox(), ['box', 'pg_catalog.box'], false)
            ->registerConverter(
                'JSON',
                new Converter\PgJson(),
                [
                    'json',
                    'jsonb',
                    'pg_catalog.json',
                    'pg_catalog.jsonb'
                ],
                false
            )
            ->registerConverter(
                'NumberRange',
                new Converter\PgNumRange(),
                [
                    'int4range', 'pg_catalog.int4range',
                    'int8range', 'pg_catalog.int8range',
                    'numrange', 'pg_catalog.numrange',
                ],
                false
            )
            ->registerConverter(
                'TsRange',
                new Converter\PgTsRange(),
                [
                    'tsrange',
                    'pg_catalog.tsrange',
                    'daterange',
                    'pg_catalog.daterange',
                    'tstzrange',
                    'pg_catalog.tstzrange',
                ],
                false
            )
            ;

        return $this;
    }
1233262
void setInitializationData(Bundle contributingBundle, ServiceReference<?> urlConverterSR) {
		if (this.contributingBundle != null || this.urlConverterSR != null) {
			throw new IllegalStateException();
		}
		this.contributingBundle = contributingBundle;
		this.urlConverterSR = urlConverterSR;
	}
10642
@Inject
  public void setConverters(List<ValueConverter<?, ?>> converterList) {

    getInitializationState().requireNotInitilized();
    this.converters = new ArrayList<>(converterList.size());
    for (ValueConverter<?, ?> converter : converterList) {
      if (!(converter instanceof ComposedValueConverter)) {
        this.converters.add(converter);
      }
    }
  }
1210384
public function initNewSession()
    {
        // starting session only if it was not started yet
        if (self::$_blIsNewSession) {
            $this->_sessionStart();
        }

        //saving persistent params if old session exists
        $aPersistent = [];
        foreach ($this->_aPersistentParams as $sParam) {
            if (($sValue = $this->getVariable($sParam))) {
                $aPersistent[$sParam] = $sValue;
            }
        }

        $this->_setSessionId($this->_getNewSessionId());

        //restoring persistent params to session
        foreach ($aPersistent as $sKey => $sParam) {
            $this->setVariable($sKey, $aPersistent[$sKey]);
        }

        $this->_initNewSessionChallenge();

        // (re)setting actual user agent when initiating new session
        $this->setVariable("sessionagent", \OxidEsales\Eshop\Core\Registry::getUtilsServer()->getServerVar('HTTP_USER_AGENT'));
    }
659879
@Override
	public void initialized(ICacheManager cacheManager) {
		final String sourceMethod = "initialized"; //$NON-NLS-1$
		final boolean isTraceLogging = log.isLoggable(Level.FINER);
		if (isTraceLogging) {
			log.entering(sourceClass, sourceMethod);
		}
		// Cache manager is initialized.  De-register the listener and add our named cache
		cacheMgrListenerReg.unregister();
		JsxConverter converter = newConverter();
		IGenericCache cache = newCache(converter, "jsx.", ""); //$NON-NLS-1$ //$NON-NLS-2$
		cache.setAggregator(aggregator);
		ResourceConverterCacheImpl oldCache = (ResourceConverterCacheImpl)cacheManager.getCache().putIfAbsent(JSX_CACHE_NAME, cache);
		if (oldCache != null) {
			converter = (JsxConverter)oldCache.getConverter();
		}
		if (isTraceLogging) {
			log.logp(Level.FINER, sourceClass, sourceMethod, "Initializing resource converter" + (oldCache != null ? " from cache." : ".")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
		}
		converter.initialize(es, xformerRes.getURI());

		if (isTraceLogging) {
			log.exiting(sourceClass, sourceMethod);
		}
	}
1086382
public function init() {
        if (!$this->database->session_lock_supported()) {
            throw new exception('sessionhandlerproblem', 'error', '', null, 'Database does not support session locking');
        }

        $result = session_set_save_handler(array($this, 'handler_open'),
            array($this, 'handler_close'),
            array($this, 'handler_read'),
            array($this, 'handler_write'),
            array($this, 'handler_destroy'),
            array($this, 'handler_gc'));
        if (!$result) {
            throw new exception('dbsessionhandlerproblem', 'error');
        }
    }
759683
public void initJpa() {
    if (jpaPersistenceUnitName != null) {
      jpaEntityManagerFactory = JpaHelper.createEntityManagerFactory(jpaPersistenceUnitName);
    }
    if (jpaEntityManagerFactory != null) {
      sessionFactories.put(EntityManagerSession.class, new EntityManagerSessionFactory(jpaEntityManagerFactory, jpaHandleTransaction, jpaCloseEntityManager));
      VariableType jpaType = variableTypes.getVariableType(JPAEntityVariableType.TYPE_NAME);
      // Add JPA-type
      if (jpaType == null) {
        // We try adding the variable right before SerializableType, if
        // available
        int serializableIndex = variableTypes.getTypeIndex(SerializableType.TYPE_NAME);
        if (serializableIndex > -1) {
          variableTypes.addType(new JPAEntityVariableType(), serializableIndex);
        } else {
          variableTypes.addType(new JPAEntityVariableType());
        }
      }

      jpaType = variableTypes.getVariableType(JPAEntityListVariableType.TYPE_NAME);

      // Add JPA-list type after regular JPA type if not already present
      if (jpaType == null) {
        variableTypes.addType(new JPAEntityListVariableType(), variableTypes.getTypeIndex(JPAEntityVariableType.TYPE_NAME));
      }
    }
  }
342927
protected function initialize()
    {
        $this->configuration = new ValueHolder($this->loadConfiguration());
        $this->defaults = new ValueHolder($this->getDefaults());

        return $this;
    }
367462
protected function initAdapter(): bool
    {
        if (null === $this->adapter || 'files' === $this->adapter) {
            // try to apply settings
            if ($settings = $this->getOption('settings', 'files')) {
                $this->setSavePath($settings['save_path']);
            }
            return true;
        }
        if (\is_string($this->adapter)) {
            $adapterClass = '\\Bluz\\Session\\Adapter\\' . ucfirst($this->adapter);
            if (!class_exists($adapterClass) || !is_subclass_of($adapterClass, \SessionHandlerInterface::class)) {
                throw new ComponentException("Class for session adapter `{$this->adapter}` not found");
            }
            $settings = $this->getOption('settings', $this->adapter) ?: [];

            $this->adapter = new $adapterClass($settings);
            return session_set_save_handler($this->adapter);
        }
        return true;
    }
443877
private function initialize()
    {
        $this->entity = '';
        $this->source = '';
        $this->mode = self::RSMODE_NOTCONNECTED;
        $this->result = null;
        $this->originalValues = null;
        $this->datafields = [];
        $this->values = [];
        $this->idFields = [];
    }
595336
public void init(BaseField field, Converter converterDest, Converter converterSource, boolean bFreeChainedConverters)
    {
        m_converterDest = converterDest;
        m_converterSource = converterSource;
        m_bFreeChainedConverters = bFreeChainedConverters;
        super.init(field);
    }
897898
protected Converter createConverter()
        throws JspException {

        FacesContext context = FacesContext.getCurrentInstance();
        Converter converter = null;
        ValueExpression vb = null;
        
        // If "binding" is set, use it to create a converter instance.
        if (binding != null) {
            try {
		vb = 
                context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), binding, Object.class);
		if (vb != null) {
                    converter = (Converter)vb.getValue(context.getELContext());
                    if (converter != null) {
                        return converter;
                    }
                }
            } catch (Exception e) {
                throw new JspException(e);
            }
        }
        // If "converterId" is set, use it to create the converter
        // instance.  If "converterId" and "binding" are both set, store the 
        // converter instance in the value of the property represented by
        // the value binding expression.      
        if (converterId != null) {
            try {
                String converterIdVal = converterId;
                if (UIComponentTag.isValueReference(converterId)) {
                    ValueExpression idBinding =
                        context.getApplication().getExpressionFactory().createValueExpression(context.getELContext(), converterId, Object.class);
                    converterIdVal = (String) idBinding.getValue(context.getELContext());
                }
                converter = context.getApplication().createConverter(converterIdVal);
                if (converter != null) {
                    if (vb != null) {
                        vb.setValue(context.getELContext(), converter);
                    }
                }
            } catch (Exception e) {
                throw new JspException(e);
            }
        }
        return converter;
    }
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
208210
@Override
  public Converter<Schema, JdbcEntrySchema, GenericRecord, JdbcEntryData> init(WorkUnitState workUnit) {
    String avroToJdbcFieldsPairJsonStr = workUnit.getProp(ConfigurationKeys.CONVERTER_AVRO_JDBC_ENTRY_FIELDS_PAIRS);
    if (!StringUtils.isEmpty(avroToJdbcFieldsPairJsonStr)) {
      if (!this.avroToJdbcColPairs.isPresent()) {
        ImmutableMap.Builder<String, String> avroToJdbcBuilder = ImmutableMap.builder();
        ImmutableMap.Builder<String, String> jdbcToAvroBuilder = ImmutableMap.builder();

        JsonObject json = new JsonParser().parse(avroToJdbcFieldsPairJsonStr).getAsJsonObject();
        for (Map.Entry<String, JsonElement> entry : json.entrySet()) {
          if (!entry.getValue().isJsonPrimitive()) {
            throw new IllegalArgumentException("Json value should be a primitive String. "
                + ConfigurationKeys.CONVERTER_AVRO_JDBC_ENTRY_FIELDS_PAIRS + " : " + avroToJdbcFieldsPairJsonStr);
          }
          avroToJdbcBuilder.put(entry.getKey(), entry.getValue().getAsString());
          jdbcToAvroBuilder.put(entry.getValue().getAsString(), entry.getKey());
        }
        this.avroToJdbcColPairs = Optional.of((Map<String, String>) avroToJdbcBuilder.build());
      }
    }
    return this;
  }
125657
public static Converter getConverter(FacesContext context, UIComponent component) {
        if (!(component instanceof ValueHolder)) {
            return null;
        }

        Converter converter = ((ValueHolder) component).getConverter();
        if (converter != null) {
            return converter;
        }

        ValueExpression valueExpression = component.getValueExpression("value");
        if (valueExpression == null) {
            return null;
        }

        Class<?> converterType = valueExpression.getType(context.getELContext());
        if (converterType == null || converterType == Object.class) {
            // no conversion is needed
            return null;
        }

        if (converterType == String.class
                && !PrimeApplicationContext.getCurrentInstance(context).getConfig().isStringConverterAvailable()) {
            return null;
        }

        return context.getApplication().createConverter(converterType);
    }
694843
private function initializeMapper() {
    // set the mapper
    $persistenceFacade = ObjectFactory::getInstance('persistenceFacade');
    if ($persistenceFacade->isKnownType($this->type)) {
      $this->mapper = $persistenceFacade->getMapper($this->type);
    }
    else {
      // initialize null mapper if not done already
      if (self::$nullMapper == null) {
        self::$nullMapper = new NullMapper();
      }
      $this->mapper = self::$nullMapper;
    }
  }
1043556
protected function initialize()
    {
        if ($this->initialized) {
            return;
        }

        foreach ($this->classes as $class) {
            $this->providers[] = new $class;
        }

        foreach ($this->providers as $provider) {
            if ($provider instanceof BuilderAwareInterface) {
                $provider->setSchemaBuilder($this->schemaBuilder);
            }
        }

        $this->initialized = true;
    }