API16

API16:JParameter/loadSetupFile

From Joomla! Documentation

Revision as of 22:52, 22 March 2010 by Doxiki (talk | contribs) (New page: ===Description=== Loads an xml setup file and parses it. <span class="editsection" style="font-size:76%;"> <nowiki>[</nowiki>Edit Descripton<n...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Description

Loads an xml setup file and parses it.

[Edit Descripton]

Template:Description:JParameter/loadSetupFile

Syntax

loadSetupFile($path)
Parameter Name Default Value Description
$path path to xml setup file.

Returns

object

Defined in

libraries/joomla/html/parameter.php

Importing

jimport( 'joomla.html.parameter' );

Source Body

public function loadSetupFile($path)
{
        $result = false;

        if ($path) {
                $xml = &JFactory::getXMLParser('Simple');

                if ($xml->loadFile($path)) {
                        if ($params = &$xml->document->params) {
                                foreach ($params as $param) {
                                        $this->setXML($param);
                                        $result = true;
                                }
                        }
                }
        } else {
                $result = true;
        }

        return $result;
}

[Edit See Also] Template:SeeAlso:JParameter/loadSetupFile

Examples

<CodeExamplesForm />