TYPO3CMS  8
 All Classes Namespaces Files Functions Variables Pages
AbstractXmlParser Class Reference
Inheritance diagram for AbstractXmlParser:
LocalizationParserInterface LocallangXmlParser XliffParser

Public Member Functions

 getParsedData ($sourcePath, $languageKey, $charset= '')
 

Protected Member Functions

 getCharset ($charset= '')
 
 parseXmlFile ()
 
 doParsingFromRoot (\SimpleXMLElement $root)
 

Protected Attributes

 $sourcePath
 
 $languageKey
 
 $charset
 

Detailed Description

Abstract class for XML based parser.

Definition at line 25 of file core/Classes/Localization/Parser/AbstractXmlParser.php.

Member Function Documentation

doParsingFromRoot ( \SimpleXMLElement  $root)
abstractprotected

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

Parameters
\SimpleXMLElement$rootA root node
Returns
array An array representing the parsed XML file

Referenced by AbstractXmlParser\parseXmlFile().

getCharset (   $charset = '')
protected

Gets the character set to use.

Parameters
string$charset
Returns
string

Definition at line 77 of file core/Classes/Localization/Parser/AbstractXmlParser.php.

References AbstractXmlParser\$charset, and GeneralUtility\makeInstance().

Referenced by LocallangXmlParser\getParsedData(), and AbstractXmlParser\getParsedData().

getParsedData (   $sourcePath,
  $languageKey,
  $charset = '' 
)

Returns parsed representation of XML file.

Parameters
string$sourcePathSource file path
string$languageKeyLanguage key
string$charsetFile charset
Returns
array
Exceptions
TYPO3

Implements LocalizationParserInterface.

Definition at line 51 of file core/Classes/Localization/Parser/AbstractXmlParser.php.

References AbstractXmlParser\$charset, AbstractXmlParser\$languageKey, AbstractXmlParser\$sourcePath, AbstractXmlParser\getCharset(), GeneralUtility\getFileAbsFileName(), GeneralUtility\llXmlAutoFileName(), and AbstractXmlParser\parseXmlFile().

parseXmlFile ( )
protected

Loads the current XML file before processing.

Returns
array An array representing parsed XML file (structure depends on concrete parser)
Exceptions
TYPO3

Definition at line 92 of file core/Classes/Localization/Parser/AbstractXmlParser.php.

References AbstractXmlParser\doParsingFromRoot().

Referenced by LocallangXmlParser\getParsedData(), and AbstractXmlParser\getParsedData().

Member Data Documentation