Symfony API
Class

Symfony\Component\Translation\Dumper\JsonFileDumper

class JsonFileDumper extends FileDumper

JsonFileDumper generates an json formatted string representation of a message catalogue.

Methods

setRelativePathTemplate(string $relativePathTemplate)

Sets the template for the relative paths to files.

from FileDumper
setBackup(bool $backup)

Sets backup flag.

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

Dumps the message catalogue.

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

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

Details

in FileDumper at line 46
public setRelativePathTemplate(string $relativePathTemplate)

Sets the template for the relative paths to files.

Parameters

string $relativePathTemplate A template for the relative paths to files

in FileDumper at line 56
public setBackup(bool $backup)

Sets backup flag.

Parameters

bool $backup

in FileDumper at line 64
public 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

at line 26
public 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