\Gettext\Languages\ExporterJson

Base class for all the exporters.

Summary

Methods
Properties
Constants
getExporters()
getExporterDescription()
getExporterClassName()
toString()
toFile()
isForPublicUse()
getDescription()
No public properties found
No constants found
toStringDo()
getEncodeOptions()
No protected properties found
N/A
No private methods found
$exporters
N/A

Properties

$exporters

$exporters : array

Type

array

Methods

getExporters()

getExporters(boolean  $onlyForPublicUse = false) : array<mixed,string>

Return the list of all the available exporters. Keys are the exporter handles, values are the exporter class names.

Parameters

boolean $onlyForPublicUse

If true, internal exporters will be omitted.

Returns

array<mixed,string>

getExporterDescription()

getExporterDescription(string  $exporterHandle) : string

Return the description of a specific exporter.

Parameters

string $exporterHandle

The handle of the exporter.

Throws

\Exception

Throws an Exception if $exporterHandle is not valid.

Returns

string

getExporterClassName()

getExporterClassName(string  $exporterHandle) : string

Returns the fully qualified class name of a exporter given its handle.

Parameters

string $exporterHandle

The exporter class handle.

Returns

string

toString()

toString(array<mixed,\Gettext\Languages\Language>  $languages,   $options = null) : string

Convert a list of Language instances to string.

Parameters

array<mixed,\Gettext\Languages\Language> $languages

The Language instances to convert.

$options

Returns

string

toFile()

toFile(array<mixed,\Gettext\Languages\Language>  $languages,   $filename,   $options = null) 

Save the Language instances to a file.

Parameters

array<mixed,\Gettext\Languages\Language> $languages

The Language instances to convert.

$filename
$options

Throws

\Exception

isForPublicUse()

isForPublicUse() : boolean

Is this exporter for public use?

Returns

boolean

getDescription()

getDescription() : string

Return a short description of the exporter.

Returns

string

toStringDo()

toStringDo(array<mixed,\Gettext\Languages\Language>  $languages) : string

Convert a list of Language instances to string.

Parameters

array<mixed,\Gettext\Languages\Language> $languages

The Language instances to convert.

Returns

string

getEncodeOptions()

getEncodeOptions() : integer

Return the options for json_encode.

Returns

integer