PHP Class Contao\CoreBundle\Config\Loader\XliffFileLoader

Inheritance: extends Symfony\Component\Config\Loader\Loader
Afficher le fichier Open project: contao/core-bundle Class Usage Examples

Méthodes publiques

Méthode Description
__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 )

Private Methods

Méthode Description
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.

Method Details

__construct() public méthode

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

load() public méthode

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
Résultat string

supports() public méthode

public supports ( $resource, $type = null )