XpressEngine Core  1.11.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
XmlLangParser Class Reference
Inheritance diagram for XmlLangParser:
XmlParser

Public Member Functions

 __construct ($xml_file, $lang_type)
 
 compile ()
 
 getCompileContent ()
 
 _compile ()
 
 _writeFile ()
 
 _parseItem ($item, $var)
 
 _parseValues ($nodes, $var)
 
 _parseValue ($node, $var)
 
 _getCompiledFileName ($lang_type, $type= 'php')
 
- Public Member Functions inherited from XmlParser
 loadXmlFile ($filename)
 
 parse ($input= '', $arg1=NULL, $arg2=NULL)
 
 _tagOpen ($parser, $node_name, $attrs)
 
 _tagBody ($parser, $body)
 
 _tagClosed ($parser, $node_name)
 
 _arrToAttrsObj ($arr)
 

Public Attributes

 $compiled_path = './files/cache/lang/'
 
 $xml_file = NULL
 
 $php_file = NULL
 
 $code
 
 $lang_types
 
 $lang_type
 
- Public Attributes inherited from XmlParser
 $oParser = NULL
 
 $input = NULL
 
 $output = array()
 
 $lang = "en"
 

Detailed Description

Definition at line 11 of file XmlLangParser.class.php.

Constructor & Destructor Documentation

XmlLangParser::__construct (   $xml_file,
  $lang_type 
)

constructor

Parameters
string$xml_file
string$lang_type
Returns
void

Definition at line 56 of file XmlLangParser.class.php.

Member Function Documentation

XmlLangParser::_compile ( )

Compile a xml_file

Returns
void

Definition at line 111 of file XmlLangParser.class.php.

XmlLangParser::_getCompiledFileName (   $lang_type,
  $type = 'php' 
)

Get cache file name

Parameters
string$lang_type
string$type
Returns
string

Definition at line 273 of file XmlLangParser.class.php.

XmlLangParser::_parseItem (   $item,
  $var 
)

Parsing item node, set content to '$this->code'

Parameters
object$item
string$var
Returns
void

Definition at line 154 of file XmlLangParser.class.php.

XmlLangParser::_parseValue (   $node,
  $var 
)

Parsing value node

Parameters
object$node
string$var
Returns
array|bool

Definition at line 254 of file XmlLangParser.class.php.

XmlLangParser::_parseValues (   $nodes,
  $var 
)

Parsing value nodes

Parameters
array$nodes
string$var
Returns
array|string

Definition at line 203 of file XmlLangParser.class.php.

XmlLangParser::_writeFile ( )

Writing cache file

Returns
void|bool

Definition at line 138 of file XmlLangParser.class.php.

XmlLangParser::compile ( )

compile a xml_file only when a corresponding php lang file does not exists or is outdated

Returns
string|bool Returns compiled php file.

Definition at line 67 of file XmlLangParser.class.php.

XmlLangParser::getCompileContent ( )

Return compiled content

Returns
string Returns compiled lang source code

Definition at line 96 of file XmlLangParser.class.php.

Member Data Documentation

XmlLangParser::$code

Definition at line 35 of file XmlLangParser.class.php.

XmlLangParser::$compiled_path = './files/cache/lang/'

Definition at line 18 of file XmlLangParser.class.php.

XmlLangParser::$lang_type

Definition at line 48 of file XmlLangParser.class.php.

XmlLangParser::$lang_types

Definition at line 41 of file XmlLangParser.class.php.

XmlLangParser::$php_file = NULL

Definition at line 29 of file XmlLangParser.class.php.

XmlLangParser::$xml_file = NULL

Definition at line 23 of file XmlLangParser.class.php.


The documentation for this class was generated from the following file: