API16:JApplicationHelper/parseXMLLangMetaFile
From Joomla! Documentation
This Namespace has been archived - Please Do Not Edit or Create Pages in this namespace. Pages contain information for a Joomla! version which is no longer supported. It exists only as a historical reference, will not be improved and its content may be incomplete.
Description:JApplicationHelper/parseXMLLangMetaFile
Contents |
Syntax
static parseXMLLangMetaFile($path)
| Parameter Name | Default Value | Description |
|---|---|---|
| $path |
Defined in
libraries/joomla/application/helper.php
Importing
jimport( 'joomla.application.helper' );
Source Body
public static function parseXMLLangMetaFile($path) { // Read the file to see if it's a valid component XML file $xml = JFactory::getXML($path); if( ! $xml) { return false; } /* * Check for a valid XML root tag. * * Should be 'langMetaData'. */ if ($xml->getName() != 'metafile') { unset($xml); return false; } $data = array(); $data['name'] = (string)$xml->name; $data['type'] = $xml->attributes()->type; $data['creationDate'] =((string)$xml->creationDate) ? (string)$xml->creationDate : JText::_('Unknown'); $data['author'] =((string)$xml->author) ? (string)$xml->author : JText::_('Unknown'); $data['copyright'] = (string)$xml->copyright; $data['authorEmail'] = (string)$xml->authorEmail; $data['authorUrl'] = (string)$xml->authorUrl; $data['version'] = (string)$xml->version; $data['description'] = (string)$xml->description; $data['group'] = (string)$xml->group; return $data; }
[Edit See Also] SeeAlso:JApplicationHelper/parseXMLLangMetaFile
Examples
<CodeExamplesForm />
