Set all formatters available.

@param array $extracters

@throws InvalidConfigurationException
553171
public function setup(array $extracters)
    {
        foreach ($extracters as $extracter) {
            if (
                (false === ($extracter['reference'] instanceof TrackingParameterQueryExtracterInterface))
                && (false === ($extracter['reference'] instanceof TrackingParameterCookieExtracterInterface))
                && (false === ($extracter['reference'] instanceof TrackingParameterInitializerInterface))
            ) {
                throw new InvalidConfigurationException(sprintf(
                    'Invalid tracking parameter extracter "%s".',
                    $extracter['name']
                ));
            }

            $this->extracters[$extracter['name']] = $extracter['reference'];
        }
    }
1267888
protected function setWriters(array $writers)
    {
        foreach ($writers as $name => $destination) {
            $this->writers[$name] = $this->buildService($destination);
        }
    }
1124003
public function init(): void
    {
        parent::init();

        if (!($this->contentFS instanceof Filesystem)) {
            throw new InvalidConfigException(sprintf('ContentFS must be instance of %s.', Filesystem::class));
        }
        if (!($this->cacheFS instanceof Filesystem)) {
            throw new InvalidConfigException(sprintf('CacheFS must be instance of %s.', Filesystem::class));
        }

        $this->iconGenerator = IconGenerator::build($this->iconSet);
        $this->formatterFactory = new FormatterFactory((array) $this->formatterConfigArray);
        $this->aliasFactory = AliasFactory::build($this->defaultAlias);
        $this->aliasFactory->addMultiple($this->aliasArray);
    }
307292
public function setAdapters($adapters)
    {
        $this->adapterClasses = [];
        $this->adapters = [];
        foreach ($adapters as $name => $adapter) {
            $this->setAdapter($name, $adapter);
        }
    }
761202
public function setLines(array $lines)
    {
        $translator = $this->factory->getTranslator();

        if ($translator instanceof Translator) {
            $translator->setLines($lines);
        }
    }
47945
public function setTranslationFiles(array $files)
    {
        foreach ($files as $language => $languageFiles) {
            $language = (string) $language;
            if ($language === '') {
                throw new \InvalidArgumentException('$language cannot be empty');
            }

            if (!is_array($languageFiles)) {
                $languageFiles = [$languageFiles];
            }

            foreach ($languageFiles as $file) {
                if (!file_exists($file)) {
                    throw new \InvalidArgumentException('Translation file "'.$file.'" not found');
                }

                $this->files[$language][] = $file;
            }
        }
    }
240152
public void setServerCustomizers(
			Collection<? extends JettyServerCustomizer> customizers) {
		Assert.notNull(customizers, "Customizers must not be null");
		this.jettyServerCustomizers = new ArrayList<>(customizers);
	}
282169
public function setConfigurators(array $configurators): self
    {
        foreach ($configurators as $configurator) {
            $isValid = $this->checkPublicStaticCallable($configurator, [LimoncelloContainerInterface::class]);
            if ($isValid === false) {
                throw new LogicException($this->getCallableToCacheMessage());
            }
        }

        $this->configurators = $configurators;

        return $this;
    }
968546
public function setTransformers(array $transformers)
    {
        foreach ($transformers as $transformer) {
            if (!$transformer instanceof TransformerInterface) {
                throw new UnexpectedTypeException($transformer, "NeuroSys\\FileMerger\\TransformerInterface");
            }
        }
        $this->transformers = $transformers;
    }
742146
def _set_formatter(self):
        
        if hasattr(self._config, "formatter") and self._config.formatter == "json":
            self._formatter = "json"
        else:
            self._formatter = "text"
531270
protected function setSerializer($outputType, array $outputOptions, $delimiter)
	{
		$className = __NAMESPACE__ . '\\Output\\' . $outputType;
		$output    = new $className($outputOptions);
		$escaper   = new Escaper($delimiter);

		$this->serializer = new Serializer($output, $this->meta, $escaper);
	}
665950
public function addFormatters(FormatterInterface ...$formatters): self
    {
        foreach ($formatters as $formatter) {
            foreach ($formatter->contentTypes() as $contentType) {
                $this->formatters[$contentType] = $formatter;
            }
        }

        return $this;
    }
1373119
public function init()
	{
		parent::init();
		if ($this->formatter == null) {
			$this->formatter = \Yii::$app->getFormatter();
		} elseif (is_array($this->formatter)) {
			$this->formatter = \Yii::createObject($this->formatter);
		}
		if (!$this->formatter instanceof Formatter) {
			throw new InvalidConfigException('The "formatter" property must be either a Format object or a configuration array.');
		}
	}
976417
public function setLoggers(array $loggers)
    {
        $prevLogged = $this->loggedErrors;
        $prev = $this->loggers;
        $flush = [];

        foreach ($loggers as $type => $log) {
            if (!isset($prev[$type])) {
                throw new \InvalidArgumentException('Unknown error type: '.$type);
            }
            if (!\is_array($log)) {
                $log = [$log];
            } elseif (!\array_key_exists(0, $log)) {
                throw new \InvalidArgumentException('No logger provided');
            }
            if (null === $log[0]) {
                $this->loggedErrors &= ~$type;
            } elseif ($log[0] instanceof LoggerInterface) {
                $this->loggedErrors |= $type;
            } else {
                throw new \InvalidArgumentException('Invalid logger provided');
            }
            $this->loggers[$type] = $log + $prev[$type];

            if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) {
                $flush[$type] = $type;
            }
        }
        $this->reRegister($prevLogged | $this->thrownErrors);

        if ($flush) {
            foreach ($this->bootstrappingLogger->cleanLogs() as $log) {
                $type = $log[2]['exception'] instanceof \ErrorException ? $log[2]['exception']->getSeverity() : E_ERROR;
                if (!isset($flush[$type])) {
                    $this->bootstrappingLogger->log($log[0], $log[1], $log[2]);
                } elseif ($this->loggers[$type][0]) {
                    $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]);
                }
            }
        }

        return $prev;
    }
725759
public static function setDumper($dumper)
    {
        if (!$dumper instanceof interfaces\Dumper && !is_callable($dumper)) {
            throw new \InvalidArgumentException('Expected an instance of ['.interfaces\Dumper::class.'] or a callable, got ['.static::getTypeName($dumper).'] instead.');
        }

        static::$dumper = $dumper;
    }
339608
protected function setFilePermissions($permissions)
    {
        $permissions = (int) $permissions;

        if (! (0b100000000 & $permissions)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid permissions "%s" for files. '
                . 'Files will not available for reading.',
                decoct($permissions)
            ));
        }
        if (! (0b010000000 & $permissions)) {
            throw new InvalidArgumentException(sprintf(
                'Invalid permissions "%s" for files. '
                . 'Files will not available for writing.',
                decoct($permissions)
            ));
        }
        $this->filePermissions = $permissions;
    }
839004
public void setValidators(final Iterable<Validator<?>> validators) {
        this.validators.clear();

        for (final Validator<?> validator : validators) {
            // this ensures we map OptionalConfigurationComponent classes to validators of the same class
            this.validators.put(validator.getSupportedClass(), validator);
        }
    }