Documentation

JsonFileDumper extends FileDumper
in package

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

Tags
author

singles

Table of Contents

Properties

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

Methods

dump()  : mixed
Dumps the message catalogue.
formatCatalogue()  : string
Transforms a domain of a message catalogue to its string representation.
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.

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[, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$messages : MessageCatalogue
$options : array<string|int, mixed> = []

Options that are used by the dumper

formatCatalogue()

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

public formatCatalogue(MessageCatalogue $messages, string $domain[, array<string|int, mixed> $options = [] ]) : string
Parameters
$messages : MessageCatalogue
$domain : string
$options : array<string|int, mixed> = []
Return values
string

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

getExtension()

Gets the file extension of the dumper.

protected getExtension() : string
Return values
string

getRelativePath()

Gets the relative file path using the template.

private getRelativePath(string $domain, string $locale) : string
Parameters
$domain : string
$locale : string
Return values
string

        
On this page

Search results