PHP Класс Contao\CoreBundle\Config\Loader\XliffFileLoader

Наследование: extends Symfony\Component\Config\Loader\Loader
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
__construct ( string $rootDir, boolean $addToGlobals = false ) Constructor.
load ( string $file, string | null $type = null ) : string Reads the contents of a XLIFF file and returns the PHP code.
supports ( $resource, $type = null )

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

Метод Описание
addGlobal ( array $chunks, mixed $value ) Adds the labels to the global PHP language array.
convertXlfToPhp ( string $name, string $language ) : string Converts an XLIFF file into a PHP language file.
fixClosingTags ( DOMNode $node ) : string Removes extra spaces in closing tags.
getChunksFromUnit ( DOMElement $unit ) : array Splits the ID attribute and returns the chunks.
getDomDocumentFromFile ( string $name ) : DOMDocument Returns a DOM document object.
getNodeByLanguage ( DOMElement $unit, string $language ) : DOMNodeList Returns a DOM node list depending on the language.
getStringRepresentation ( array $chunks, mixed $value ) : string Returns a string representation of the global PHP language array.
quoteKey ( string $key ) : integer | string Quotes an array key to be used as PHP string.
quoteValue ( string $value ) : string Quotes a value to be used as PHP string.

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

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

Constructor.
public __construct ( string $rootDir, boolean $addToGlobals = false )
$rootDir string
$addToGlobals boolean

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

Reads the contents of a XLIFF file and returns the PHP code.
public load ( string $file, string | null $type = null ) : string
$file string
$type string | null
Результат string

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

public supports ( $resource, $type = null )