PHP Класс Sulu\Bundle\TranslateBundle\Translate\Export

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( Translator $translator, Symfony\Component\Console\Output\OutputInterface $output )
execute ( ) Executes the export by loading the catalogue and writing messages from the defined domains to the defined file.
getBackend ( ) : boolean Returns whether the backend translations should be included in the export or not.
getFilename ( ) : string Returns the name of the file to export.
getFormat ( ) : string Returns the format, in which the catalogue should be exported.
getFrontend ( ) : boolean Returns whether the frontend translations should be included in the export or not.
getLocale ( ) : string Returns the locale of the package, which should be exported.
getPath ( ) : string Returns the path to the directory, in which the export should be located.
setBackend ( boolean $backend ) Sets whether the backend translations should be included in the export or not.
setFilename ( string $filename ) Sets the filename.
setFormat ( string $format ) Set the format, in which the catalogue should be exported.
setFrontend ( boolean $frontend ) Sets whether the frontend translations should be included in the export or not.
setLocale ( string $locale ) Sets the locale of the package, which should be exported.
setPath ( string $path ) Sets the path to the directory, in which the export should be located.

Приватные методы

Метод Описание
getMessagesForDomain ( Symfony\Component\Translation\MessageCatalogueInterface $catalogue, $domain ) : array Gets the messages of a given catalogue and a given domain.
newFileDumper ( ) : Symfony\Component\Translation\Dumper\FileDumper Constructs a new file dumper depending on the defined format.
writeMessagesFile ( $messages ) Writes an array of translation messages to the defined file.

Описание методов

__construct() публичный Метод

public __construct ( Translator $translator, Symfony\Component\Console\Output\OutputInterface $output )
$translator Symfony\Component\Translation\Translator
$output Symfony\Component\Console\Output\OutputInterface

execute() публичный Метод

Executes the export by loading the catalogue and writing messages from the defined domains to the defined file.
public execute ( )

getBackend() публичный Метод

Returns whether the backend translations should be included in the export or not.
public getBackend ( ) : boolean
Результат boolean

getFilename() публичный Метод

Returns the name of the file to export.
public getFilename ( ) : string
Результат string

getFormat() публичный Метод

Returns the format, in which the catalogue should be exported.
public getFormat ( ) : string
Результат string

getFrontend() публичный Метод

Returns whether the frontend translations should be included in the export or not.
public getFrontend ( ) : boolean
Результат boolean

getLocale() публичный Метод

Returns the locale of the package, which should be exported.
public getLocale ( ) : string
Результат string

getPath() публичный Метод

If the path is not explicitly set, the current working directory will be returned.
public getPath ( ) : string
Результат string

setBackend() публичный Метод

Sets whether the backend translations should be included in the export or not.
public setBackend ( boolean $backend )
$backend boolean

setFilename() публичный Метод

Sets the filename.
public setFilename ( string $filename )
$filename string

setFormat() публичный Метод

Set the format, in which the catalogue should be exported.
public setFormat ( string $format )
$format string

setFrontend() публичный Метод

Sets whether the frontend translations should be included in the export or not.
public setFrontend ( boolean $frontend )
$frontend boolean

setLocale() публичный Метод

Sets the locale of the package, which should be exported.
public setLocale ( string $locale )
$locale string

setPath() публичный Метод

Sets the path to the directory, in which the export should be located.
public setPath ( string $path )
$path string