API16

JParameter/loadSetupFile

< API16:JParameter

The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.

Description

Loads an xml setup file and parses it.



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;
}



Examples

Code Examples


Advertisement