API16:JInstaller/getParams
From Joomla! Documentation
Description
Method to parse the parameters of an extension, build the INI string for it's default parameters, and return the INI string.
<! removed transcluded page call, red link never existed >
Syntax
getParams()
Returns
string INI string of parameter values
Defined in
libraries/joomla/installer/installer.php
Importing
jimport( 'joomla.installer.installer' );
Source Body
public function getParams()
{
// Get the manifest document root element
$root = & $this->manifest->document;
// Get the element of the tag names
$params = $this->manifest->params;
if( ! count($params->children())) {
// Either the tag does not exist or has no children therefore we return zero files processed.
return null;
}
// Process each parameter in the $params array.
$ini = null;
foreach ($params as $param)
{
if (!$name = $param->attributes()->name) {
continue;
}
if (!$value = $param->attributes()->default) {
continue;
}
$ini .= $name."=".$value."\n";
}
return $ini;
}
<! removed transcluded page call, red link never existed >
Examples
Code Examples