‪TYPO3CMS  10.4
TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser Class Reference
Inheritance diagram for TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser:
TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser TYPO3\CMS\Core\Localization\Parser\LocalizationParserInterface

Public Member Functions

 __construct ()
 
array getParsedData ($sourcePath, $languageKey)
 
array getParsedTargetData ($path)
 

Protected Member Functions

array doParsingFromRootForElement (\SimpleXMLElement $root, $element)
 
array getParsedDataForElement (\SimpleXMLElement $bodyOfFileTag, $element)
 
array doParsingFromRoot (\SimpleXMLElement $root)
 
array doParsingTargetFromRoot (\SimpleXMLElement $root)
 
array parseXmlTargetFile ($targetPath)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser
array parseXmlFile ()
 
string getLocalizedFileName ($fileRef, $language, $sameLocation=false)
 

Protected Attributes

array $parsedTargetFiles
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser
string $sourcePath
 
string $languageKey
 

Detailed Description

Parser for XML locallang file.

This class is a concrete implementation and is not part of the TYPO3 Core API.

Deprecated:
‪since v10.1 and will be removed in TYPO3 v11

Definition at line 28 of file LocallangXmlParser.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::__construct ( )

Definition at line 30 of file LocallangXmlParser.php.

Member Function Documentation

◆ doParsingFromRoot()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::doParsingFromRoot ( \SimpleXMLElement  $root)
protected

Returns array representation of XLIFF data, starting from a root node.

Parameters
\SimpleXMLElement$root‪A root node
Returns
‪array An array representing parsed XLIFF

Reimplemented from TYPO3\CMS\Core\Localization\Parser\AbstractXmlParser.

Definition at line 140 of file LocallangXmlParser.php.

◆ doParsingFromRootForElement()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::doParsingFromRootForElement ( \SimpleXMLElement  $root,
  $element 
)
protected

Returns array representation of XLIFF data, starting from a root node.

Parameters
\SimpleXMLElement$root‪XML root element
string$element‪Target or Source
Returns
‪array
Exceptions
InvalidXmlFileException

Definition at line 76 of file LocallangXmlParser.php.

References TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser\getParsedDataForElement(), and TYPO3\CMS\Core\Utility\PathUtility\stripPathSitePrefix().

◆ doParsingTargetFromRoot()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::doParsingTargetFromRoot ( \SimpleXMLElement  $root)
protected

Returns array representation of XLIFF data, starting from a root node.

Parameters
\SimpleXMLElement$root‪A root node
Returns
‪array An array representing parsed XLIFF

Definition at line 151 of file LocallangXmlParser.php.

◆ getParsedData()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedData (   $sourcePath,
  $languageKey 
)

◆ getParsedDataForElement()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedDataForElement ( \SimpleXMLElement  $bodyOfFileTag,
  $element 
)
protected

Parse the given language key tag

Parameters
\SimpleXMLElement$bodyOfFileTag
string$element
Returns
‪array

Definition at line 111 of file LocallangXmlParser.php.

Referenced by TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser\doParsingFromRootForElement().

◆ getParsedTargetData()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::getParsedTargetData (   $path)

Returns parsed representation of XML file.

Parses XML if it wasn't done before. Caches parsed data.

Parameters
string$path‪An absolute path to XML file
Returns
‪array Parsed XML file

Definition at line 164 of file LocallangXmlParser.php.

Referenced by TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser\getParsedData().

◆ parseXmlTargetFile()

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::parseXmlTargetFile (   $targetPath)
protected

Reads and parses XML file and returns internal representation of data.

Parameters
string$targetPath‪Path of the target file
Returns
‪array
Exceptions

Definition at line 179 of file LocallangXmlParser.php.

Member Data Documentation

◆ $parsedTargetFiles

array TYPO3\CMS\Core\Localization\Parser\LocallangXmlParser::$parsedTargetFiles
protected

Associative array of "filename => parsed data" pairs.

Definition at line 39 of file LocallangXmlParser.php.