W3cubDocs

/Symfony 4.1

FileDumper

abstract class FileDumper implements DumperInterface

FileDumper is an implementation of DumperInterface that dump a message catalogue to file(s).

Options: - path (mandatory): the directory where the files should be saved

Properties

protected string $relativePathTemplate A template for the relative paths to files.

Methods

setRelativePathTemplate(string $relativePathTemplate)

Sets the template for the relative paths to files.

setBackup(bool $backup) deprecated

Sets backup flag.

dump(MessageCatalogue $messages, array $options = array())

Dumps the message catalogue.

string formatCatalogue(MessageCatalogue $messages, string $domain, array $options = array())

Transforms a domain of a message catalogue to its string representation.

string getExtension()

Gets the file extension of the dumper.

Details

setRelativePathTemplate(string $relativePathTemplate)

Sets the template for the relative paths to files.

Parameters

string $relativePathTemplate A template for the relative paths to files

setBackup(bool $backup) deprecated

deprecated

since Symfony 4.1

Sets backup flag.

Parameters

bool $backup

dump(MessageCatalogue $messages, array $options = array())

Dumps the message catalogue.

Parameters

MessageCatalogue $messages The message catalogue
array $options Options that are used by the dumper

abstract string formatCatalogue(MessageCatalogue $messages, string $domain, array $options = array())

Transforms a domain of a message catalogue to its string representation.

Parameters

MessageCatalogue $messages
string $domain
array $options

Return Value

string representation

abstract protected string getExtension()

Gets the file extension of the dumper.

Return Value

string file extension

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Translation/Dumper/FileDumper.html