TranslationWriter
in package
implements
TranslationWriterInterface
TranslationWriter writes translation messages.
Tags
Table of Contents
Interfaces
- TranslationWriterInterface
- TranslationWriter writes translation messages.
Properties
- $dumpers : array<string, DumperInterface>
Methods
- addDumper() : mixed
- Adds a dumper to the writer.
- getFormats() : array<string|int, mixed>
- Obtains the list of supported formats.
- write() : mixed
- Writes translation from the catalogue according to the selected format.
Properties
$dumpers
private
array<string, DumperInterface>
$dumpers
= []
Methods
addDumper()
Adds a dumper to the writer.
public
addDumper(string $format, DumperInterface $dumper) : mixed
Parameters
- $format : string
- $dumper : DumperInterface
getFormats()
Obtains the list of supported formats.
public
getFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>write()
Writes translation from the catalogue according to the selected format.
public
write(MessageCatalogue $catalogue, string $format[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
- $catalogue : MessageCatalogue
- $format : string
-
The format to use to dump the messages
- $options : array<string|int, mixed> = []
-
Options that are passed to the dumper