PoFileDumper
extends FileDumper
in package
PoFileDumper 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.
- escape() : string
- formatComments() : string|null
- getRelativePath() : string
- Gets the relative file path using the template.
- getStandardRules() : mixed
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
escape()
private
escape(string $str) : string
Parameters
- $str : string
Return values
string —formatComments()
private
formatComments(mixed $comments[, string $prefix = '' ]) : string|null
Parameters
- $comments : mixed
- $prefix : string = ''
Return values
string|null —getRelativePath()
Gets the relative file path using the template.
private
getRelativePath(string $domain, string $locale) : string
Parameters
- $domain : string
- $locale : string
Return values
string —getStandardRules()
private
getStandardRules(string $id) : mixed
Parameters
- $id : string