Initializes the filter type extensions.

@throws UnexpectedTypeException if any registered type extension is not
an instance of FormTypeExtensionInterface
161240
private function initFilterTypeExtensions()
    {
        $this->filterTypeExtensions = [];

        foreach ($this->loadFilterTypeExtensions() as $extension) {
            if (!$extension instanceof FilterTypeExtensionInterface) {
                throw new UnexpectedTypeException($extension, FilterTypeExtensionInterface::class);
            }

            $type = $extension->getExtendedType();

            $this->filterTypeExtensions[$type][] = $extension;
        }
    }
657916
public function onSubmit(FormEvent $event)
    {
        $data = $event->getData();

        if (null === $data) {
            $data = array();
        }

        if (!is_array($data) && !($data instanceof \Traversable && $data instanceof \ArrayAccess)) {
            throw new UnexpectedTypeException($data, 'array or (\Traversable and \ArrayAccess)');
        }

        foreach ($this->schema->getGroups() as $schemaGroup) {
            foreach ($schemaGroup->getDefinitions() as $schemaDefinition) {
                if (true === $schemaDefinition->getVirtual()) {
                    continue;
                }
                $identifier = $schemaDefinition->getIdentifier();
                if ($data->offsetExists($identifier)) {
                    /** @var CharacteristicInterface $characteristic */
                    $characteristic = $data->offsetGet($identifier);
                    if ($this->isNullOrEqualsParentData($characteristic)) {
                        $data->offsetUnset($identifier);
                        $this->em->remove($characteristic);
                    } else {
                        $characteristic->setIdentifier($identifier);
                    }
                } else {
                    throw new \RuntimeException(sprintf('Missing [%s] characteristic data.', $identifier));
                }
            }
        }

        $event->setData($data);
    }
421017
public void init(BaseMessageReceiver messageReceiver, BaseMessageFilter messageFilter)
    {
        if (messageFilter == null)
        {
            if (messageReceiver != null)
            {
                messageFilter = messageReceiver.createDefaultFilter(this);    // Add filter to handler
                return; // All done. (createDefaultFilter adds the message listener to the new filter)
            }
        }
        if (messageFilter != null)
            messageFilter.addMessageListener(this);     // This will also add the message filter to my list.
    }
1002674
private static void parseFilters(final FilterType filterType, final WebApp webApp) {
		final WebAppFilter filter = new WebAppFilter();
		if (filterType.getFilterName() != null) {
			filter.setFilterName(filterType.getFilterName().getValue());
		}
		if (filterType.getFilterClass() != null) {
			filter.setFilterClass(filterType.getFilterClass().getValue());
		}

		if (filterType.getAsyncSupported() != null) {
			filter.setAsyncSupported(filterType.getAsyncSupported().isValue());
		}

		webApp.addFilter(filter);
		List<ParamValueType> initParams = filterType.getInitParam();
		if (initParams != null && initParams.size() > 0) {
			for (ParamValueType initParamElement : initParams) {
				final WebAppInitParam initParam = new WebAppInitParam();
				initParam.setParamName(initParamElement.getParamName().getValue());
				initParam.setParamValue(initParamElement.getParamValue().getValue());
				filter.addInitParam(initParam);
			}
		}

		List<DescriptionType> description = filterType.getDescription();
		for (DescriptionType descriptionType : description) {
			filter.addDispatcherType(DispatcherType.valueOf(descriptionType.getValue()));
		}
	}
447217
public void init(IFilterConfig filterConfig) throws ServletException
    {
        try
        {
            // init the filter instance
            _filterState = FILTER_STATE_INITIALIZING;

    		// LIDB-3598: begin
            this._filterConfig = filterConfig;
    		if(_eventSource != null && _eventSource.hasFilterListeners()){
	    	        
	           	_eventSource.onFilterStartInit(getFilterEvent());
	    		// LIDB-3598: end
	        	_filterInstance.init(filterConfig);
	        	// LIDB-3598: begin
	        	_eventSource.onFilterFinishInit(getFilterEvent());
	    		// LIDB-3598: end
    		}
    		else{
    			_filterInstance.init(filterConfig);
    		}

            _filterState = FILTER_STATE_AVAILABLE;
        }
        catch (Throwable th)
        {
    		if(_eventSource != null && _eventSource.hasFilterErrorListeners()){
	        	FilterErrorEvent errorEvent = getFilterErrorEvent(th);
	        	_eventSource.onFilterInitError(errorEvent);
    		}
        	
            com.ibm.wsspi.webcontainer.util.FFDCWrapper.processException(th, "com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.init", "111", this);
            _filterState = FILTER_STATE_UNAVAILABLE;
            throw new ServletException(MessageFormat.format("Filter [{0}]: could not be initialized", new Object[] {_filterName}), th);
        }

    }
231112
private function initFieldType($type)
    {
        if (isset($this->fieldTypes[$type])) {
            return;
        }

        $typeInstance = false;
        foreach ($this->extensions as $extension) {
            if ($extension->hasFieldType($type)) {
                $typeInstance = $extension->getFieldType($type);
                break;
            }
        }

        if (!$typeInstance) {
            return;
        }

        $this->fieldTypes[$type] = $typeInstance;

        $ext = [];
        foreach ($this->extensions as $extension) {
            if ($extension->hasFieldTypeExtensions($type)) {
                $fieldExtensions = $extension->getFieldTypeExtensions($type);
                foreach ($fieldExtensions as $fieldExtension) {
                    $ext[] = $fieldExtension;
                }
            }
        }

        $this->fieldExtensions[$type] = $ext;
    }
222685
public function initFilters()
    {

        //Only run on frontend
        if (is_admin()) {
            return;
        }

        global $wp_query;

        if ((is_category() || is_tax() || is_tag()) && !get_post_type()) {
            $postType = 'post';
        }

        $postType = get_post_type();

        if (!$postType && isset($wp_query->query['post_type'])) {
            $postType = $wp_query->query['post_type'];
        }

        if (!$postType) {
            return;
        }

        $queriedObject = get_queried_object();
        $objectId = null;
        if (isset($queriedObject->ID)) {
            $objectId = $queriedObject->ID;
        }

        $pageForPosts = get_option('page_for_' . get_post_type());

        if (($pageForPosts !== $objectId && !is_archive() && !is_post_type_archive() && !is_home() && !is_category() && !is_tax() && !is_tag()) || is_admin()) {
            return;
        }

        add_action('Municipio/viewData', function ($data) use ($wp_query, $postType) {

            //Get current post type enabledTaxonomyFilters
            if (!isset($data['postType']) || !$data['postType']) {
                $data['postType'] = $postType;
            }

            //Get header filters
            if ($enabledHeaderFilters = get_field('archive_' . $data['postType'] . '_post_filters_header', 'option')) {
                $data['enabledHeaderFilters'] = $enabledHeaderFilters;
            } else {
                $data['enabledHeaderFilters'] = array();
            }

            //Get taxonomy filters
            if ($enabledTaxonomyFilters = $this->getEnabledTaxonomies($data['postType'])) {
                $data['enabledTaxonomyFilters'] = $enabledTaxonomyFilters;
            } else {
                $data['enabledTaxonomyFilters'] = array();
            }

            //Is query string present?
            $data['queryString'] = (isset($_SERVER['QUERY_STRING']) && !empty($_SERVER['QUERY_STRING'])) ? true : false;

            //The archive url
            $data['archiveUrl'] = $this->getArchiveSlug($postType);

            $data['searchQuery'] = $this->getSearchQuery();

            return $data;
        });
    }
1004051
public void registerFilters() {
        addExcludeFilter(new TypeFilter() {
            @Override
            public boolean match(MetadataReader metadataReader, MetadataReaderFactory metadataReaderFactory) {
                return !metadataReader.getClassMetadata().isInterface();
            }
        });
        addIncludeFilter(new AnnotationTypeFilter(SpringRestClientEnabled.class));
    }
1249145
private void decideTypeFilterToAdd(Filter filter) {
        Filter step = filter;

        if (Operator.MATCH == step.getRelation().getOperator() ||
                step.getRelation().getRightTerm() instanceof FunctionSelector) {
            if (matchList.isEmpty()) {
                matchList = new ArrayList<>();
            }
            matchList.add(filter);
        } else {
            if (filterList.isEmpty()) {
                filterList = new ArrayList<>();
            }
            filterList.add(filter);
        }
    }
205583
public void init(FilterConfig filterConfig) throws ServletException {
    super.init(filterConfig);

    String dirBrowse = filterConfig.getInitParameter("directoryBrowsingDisallowed");

    if (dirBrowse != null) {
      dirBrowse = dirBrowse.toLowerCase();

      directoryBrowsingDisallowed = dirBrowse.equals("yes") ||
                                    dirBrowse.equals("true");
    }
  }
737322
public function initTypes()
    {
        $names = $this->generateTypesNames();
        foreach ($names as $name) {
            $object = $this->getNewType($name);
            $this->addType($object);
        }
    }
80425
public function init()
	{
		if (!in_array($this->extension, static::$ALLOWED_EXTENSIONS)) {
			$msg = Yii::t('app', 'Illegal extension {ext}, only these are allowed: {allowed}', [
				'ext'=>$this->extension,
				'allowed'=>implode(', ', static::$ALLOWED_EXTENSIONS),
			]);
			throw new InvalidConfigException($msg);
		}
	}
371819
@Override
    public void initialize() {
        this.fileAlterationObserver = new FileAlterationObserver(directory, fileFilter);
        this.fileAlterationObserver.addListener(this);
        try {
            this.fileAlterationObserver.initialize();
        } catch (Exception e) {
        }
    }
1090216
function init_extensions()
	{
		$filename = $this->froot.'cfg/extensions.php';
		if (is_file($filename))
		{
			include_once($filename);
		}

		$this->extensions = new EresusExtensions();
	}
499871
@SafeVarargs
    public static void registerFilterTypes(final Class<? extends DynamicFilter>... types) {
        FILTER_TYPES.addAll(Arrays.asList(types));
    }
37750
private function initTypes()
    {
        $this->types = array();

        foreach ($this->loadTypes() as $type) {
            if (!$type instanceof TableTypeInterface) {
                throw new UnexpectedTypeException($type, 'Swoopaholic\Component\Table\TableTypeInterface');
            }

            $this->types[$type->getName()] = $type;
        }
    }
376954
static void init(boolean includeAddOns) {
        loadedPlugins = new ArrayList<>(CoreFunctionality.getBuiltInActiveScanRules());
        if (includeAddOns) {
            loadedPlugins.addAll(ExtensionFactory.getAddOnLoader().getActiveScanRules());
        }
        //sort by the criteria below.
        Collections.sort(loadedPlugins, riskComparator);

        mapLoadedPlugins = new HashMap<>();
        for (Plugin plugin : loadedPlugins) {
            checkPluginId(plugin);
            mapLoadedPlugins.put(plugin.getId(), plugin);
        }
    }