From 8ce344ef6593987734e48a0fe094590790cbaf64 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 31 Oct 2023 17:55:04 +0100 Subject: [PATCH] remove the WriteConfig class --- .../Bridge/Phrase/Config/WriteConfig.php | 69 ------------------- 1 file changed, 69 deletions(-) delete mode 100644 src/Symfony/Component/Translation/Bridge/Phrase/Config/WriteConfig.php diff --git a/src/Symfony/Component/Translation/Bridge/Phrase/Config/WriteConfig.php b/src/Symfony/Component/Translation/Bridge/Phrase/Config/WriteConfig.php deleted file mode 100644 index 4cb9153fd5a30..0000000000000 --- a/src/Symfony/Component/Translation/Bridge/Phrase/Config/WriteConfig.php +++ /dev/null @@ -1,69 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Translation\Bridge\Phrase\Config; - -use Symfony\Component\Translation\Provider\Dsn; - -/** - * @author wicliff - */ -class WriteConfig -{ - private const DEFAULTS = [ - 'file_format' => 'symfony_xliff', - 'update_translations' => '1', - ]; - - private function __construct( - private array $options, - ) { - } - - /** - * @return $this - */ - public function setTag(string $tag): static - { - $this->options['tags'] = $tag; - - return $this; - } - - /** - * @return $this - */ - public function setLocale(string $locale): static - { - $this->options['locale_id'] = $locale; - - return $this; - } - - public function getOptions(): array - { - return $this->options; - } - - /** - * @return $this - */ - public static function fromDsn(Dsn $dsn): static - { - $options = $dsn->getOptions()['write'] ?? []; - - unset($options['file_format'], $options['tags'], $options['locale_id'], $options['file']); - - $configOptions = array_merge(self::DEFAULTS, $options); - - return new self($configOptions); - } -} pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy