Set the filter aliases.

@param array $aliases array where keys are aliases and values pass is_callable().
@return void

@throws Exception Thrown if any of the given $aliases is not valid. @see registerAlias()
761557
public static function setFilterAliases(array $aliases)
    {
        $originalAliases = self::$registeredFilterAliases;
        self::$registeredFilterAliases = [];
        try {
            foreach ($aliases as $alias => $callback) {
                self::registerAlias($alias, $callback);
            }
        } catch (Throwable $throwable) {
            self::$registeredFilterAliases = $originalAliases;
            throw $throwable;
        }
    }
826249
public function alias($alias, $name) {
		if (is_array($alias)) {
			foreach ($alias as $key) {
				$this->alias($key, $name);
			}

			return;
		}

		$this->aliases[$alias] = $name;
	}
1041358
public function setFilters(array $filters = [])
    {
        foreach ($filters as $filterName => $filterValue) {
            $this->addFilter($filterName, $filterValue);
        }

        return $this;
    }
1107366
public function create(array $aliases): AlgorithmManager
    {
        $algorithms = [];
        foreach ($aliases as $alias) {
            if (\array_key_exists($alias, $this->algorithms)) {
                $algorithms[] = $this->algorithms[$alias];
            } else {
                throw new \InvalidArgumentException(\sprintf('The algorithm with the alias "%s" is not supported.', $alias));
            }
        }

        return AlgorithmManager::create($algorithms);
    }
746446
public function setOptionAlias($aliases, $name, $global = false)
	{
		if ($global)
		{
			$this->globalOptions->setAlias($aliases, $name);
		}
		else
		{
			$this->options->setAlias($aliases, $name);
		}

		return $this;
	}
1230549
public void setAliases(java.util.Collection<String> aliases) {
        if (aliases == null) {
            this.aliases = null;
            return;
        }

        this.aliases = new java.util.ArrayList<String>(aliases);
    }
307292
public function setAdapters($adapters)
    {
        $this->adapterClasses = [];
        $this->adapters = [];
        foreach ($adapters as $name => $adapter) {
            $this->setAdapter($name, $adapter);
        }
    }
74847
public function addAliases(array $aliases)
    {
        foreach ($aliases as $alias => $id) {
            $this->setAlias($alias, $id);
        }
    }
927114
public function setFilters(array $filters)
    {
        foreach ($filters as $filter) {
            if (! $filter instanceof Filter) {
                throw new InvalidArgumentException('Filter have to be an instanceof ZfcDatagrid\Filter');
            }
        }

        $this->filters = $filters;
    }
830858
public static function setAlias($alias)
    {
        if (self::isConfigKeyExist($alias, 'shortcuts')) {
            $shortcuts = self::$config[$alias]['shortcuts'];
            //
            foreach ($shortcuts as $alias => $target) {
                $target = Strings::replace($target, '/', '\\');
                Alias::set($target, $alias);
            }
        }
    }
804798
public function setAliasesId(Collection $pages)
    {
        $pages->each(function (PageInterface $page) {
            $page->setAliasId();

            if ($page->getPages()->count()) {
                $this->setAliasesId($page->getPages());
            }
        });
    }
982151
public function setPaths($paths)
    {
        $this->paths = $paths;
        self::$pathsMap[$this->namespace] = $this->paths;
    }
1122940
public function withFacades($aliases = true, $userAliases = [])
    {
        Facade::setFacadeApplication($this);

        if ($aliases) {
            $this->withAliases($userAliases);
        }
    }
982903
public function setAlias(string $name, $alias): void
    {
        foreach ((array)$alias as $aliasName) {
            if (!isset($this->aliases[$aliasName])) {
                $this->aliases[$aliasName] = $name;
            }
        }
    }
849362
public function updateAliases(array $aliasActions)
    {
        if (!isset($aliasActions['actions'])) {
            throw new RepositoryException('Actions key is missing');
        }

        $request = $this->createRequestInstance(self::INDEX_UPDATE_ALIASES, null, null);
        $request->setBody($aliasActions);

        return $this->client->send($request);
    }
1120996
public function setAlias($alias)
    {
        if (is_array($alias)) {
            $this->aliasArray = $this->valideAliasArray($alias);
            $this->aliasName = $this->aliasArrayToName($this->aliasArray);
        } else {
            $this->aliasName = $this->valideAliasName($alias);
            $this->aliasArray = $this->aliasNameToArray($this->aliasName);
        }

        return $this;
    }
599761
private function initFilters(array $filters)
    {
    	$result = array();
    
    	$fm = $this->getFilterManager();
    
    	foreach ($filters as $alias => $options) {
    		$option = null;
    		if (is_array($options)) {
    			if (!isset($options['name'])) {
    				throw new Exception\InvalidArgumentException(
    						'Filter "' . $alias . '" required option "name"'
    				);
    			}
    
    			$name = $options['name'];
    			$option = isset($options['option']) ? $options['option'] : null;
    		} elseif (is_string($options)) {
    			$name = $options;
    			unset($options);
    		}
    
    		if (is_numeric($alias)) {
    			$alias = $name;
    		}
    
    		// Filter Id should have optional filter indicator "?"
    		$filterId = ltrim($alias, '?');
    
    		if (!$fm->has($filterId)) {
    			if (is_array($option) && !empty($option)) {
    				$r = new \ReflectionClass($name);
    				$filter = $r->newInstanceArgs($option);
    			} else if ($option) {
    				$filter = new $name($option);
    			} else {
    				$filter = new $name();
    			}
    
    			$fm->set($filterId, $filter);
    		}
    
    		$result[] = $alias;
    	}
    
    	return $result;
    }