MoFileDumper
extends FileDumper
in package
MoFileDumper generates a gettext formatted string representation of a message catalogue.
Tags
Table of Contents
- $relativePathTemplate : string
- A template for the relative paths to files.
- dump() : mixed
- Dumps the message catalogue.
- formatCatalogue() : string
- Transforms a domain of a message catalogue to its string representation.
- setBackup() : mixed
- Sets backup flag.
- setRelativePathTemplate() : mixed
- Sets the template for the relative paths to files.
- getExtension() : string
- Gets the file extension of the dumper.
- getRelativePath() : string
- Gets the relative file path using the template.
- writeLong() : string
Properties
$relativePathTemplate
A template for the relative paths to files.
protected
string
$relativePathTemplate
= '%domain%.%locale%.%extension%'
Methods
dump()
Dumps the message catalogue.
public
dump(MessageCatalogue $messages[, mixed $options = [] ]) : mixed
Parameters
- $messages : MessageCatalogue
- $options : mixed = []
-
Options that are used by the dumper
Return values
mixed —formatCatalogue()
Transforms a domain of a message catalogue to its string representation.
public
formatCatalogue(MessageCatalogue $messages, mixed $domain[, array<string|int, mixed> $options = [] ]) : string
Parameters
- $messages : MessageCatalogue
- $domain : mixed
- $options : array<string|int, mixed> = []
Return values
string —representation
setBackup()
Sets backup flag.
public
setBackup(bool $backup) : mixed
Parameters
- $backup : bool
Tags
Return values
mixed —setRelativePathTemplate()
Sets the template for the relative paths to files.
public
setRelativePathTemplate(string $relativePathTemplate) : mixed
Parameters
- $relativePathTemplate : string
-
A template for the relative paths to files
Return values
mixed —getExtension()
Gets the file extension of the dumper.
protected
getExtension() : string
Return values
string —file extension
getRelativePath()
Gets the relative file path using the template.
private
getRelativePath(string $domain, string $locale) : string
Parameters
- $domain : string
- $locale : string
Return values
string —writeLong()
private
writeLong(mixed $str) : string
Parameters
- $str : mixed