Constructor
JParameter
__construct
([string $data = ''], [string $path = ''])
-
string
$data: The raw parms text.
-
string
$path: Path to the XML setup file.
Redefinition of:
- JRegistry::__construct()
- Constructor
Add a directory where JParameter should search for element types.
You may either pass a string or an array of directories.
JParameter will be searching for a element type in the same order you added them. If the parameter type cannot be found in the custom folders, it will look in JParameter/types.
void
addElementPath
(mixed $path)
-
mixed
$path: Directory (string) or directories (array) to search.
Bind data to the parameter.
boolean
bind
(mixed $data, [string $group = '_default'])
-
mixed
$data: An array or object.
-
string
$group: An optional group that the data should bind to. The default group is used if not supplied.
Sets a default value if not alreay assigned.
string
def
(string $key, [string $default = ''], [string $group = '_default'])
-
string
$key: The name of the parameter.
-
string
$default: An optional value for the parameter.
-
string
$group: An optional group for the parameter.
Redefinition of:
- JRegistry::def()
- Sets a default value if not already assigned.
Get the number of params in each group.
array
getGroups
()
Return the number of parameters in a group.
mixed
getNumParams
([string $group = '_default'])
-
string
$group: An optional group. The default group is used if not supplied.
Render a parameter type.
array
getParam
(object &$node, [string $control_name = 'params'], [string $group = '_default'])
-
object
&$node: A parameter XML element.
-
string
$control_name: An optional name of the HTML form control. The default is 'params' if not supplied.
-
string
$group: An optional group to render. The default group is used if not supplied.
Render all parameters.
array
getParams
([string $name = 'params'], [string $group = '_default'])
-
string
$name: An optional name of the HTML form control. The default is 'params' if not supplied.
-
string
$group: An optional group to render. The default group is used if not supplied.
Loads an element type.
object
loadElement
(string $type, [boolean $new = false])
-
string
$type: The element type.
-
boolean
$new: False (default) to reuse parameter elements; true to load the parameter element type again.
Loads an XML setup file and parses it.
object
loadSetupFile
(string $path)
-
string
$path: A path to the XML setup file.
Redefinition of:
- JRegistry::loadSetupFile()
- This method is added as an interim solution for API references in the Joomla! CMS 1.6 to the JRegistry object where in 1.5 a JParameter object existed. Because many extensions may call this method we add it here as a means of "pain relief" until the 1.8 release.
Render the form control.
string
render
([string $name = 'params'], [string $group = '_default'])
-
string
$name: An optional name of the HTML form control. The default is 'params' if not supplied.
-
string
$group: An optional group to render. The default group is used if not supplied.
Render all parameters to an array.
array
renderToArray
([string $name = 'params'], [string $group = '_default'])
-
string
$name: An optional name of the HTML form control. The default is 'params' if not supplied.
-
string
$group: An optional group to render. The default group is used if not supplied.
Sets the XML object from custom XML files.
Inherited Methods
Inherited From JRegistry
JRegistry::__construct()
JRegistry::asArray()
JRegistry::bindData()
JRegistry::def()
JRegistry::exists()
JRegistry::get()
JRegistry::getInstance()
JRegistry::getNameSpaces()
JRegistry::getValue()
JRegistry::loadArray()
JRegistry::loadFile()
JRegistry::loadINI()
JRegistry::loadJSON()
JRegistry::loadObject()
JRegistry::loadSetupFile()
JRegistry::loadString()
JRegistry::loadXML()
JRegistry::makeNameSpace()
JRegistry::merge()
JRegistry::set()
JRegistry::setValue()
JRegistry::toArray()
JRegistry::toObject()
JRegistry::toString()
JRegistry::__clone()
JRegistry::__toString()