class JParameter extends JRegistry


Located at : UKNOWVA_ROOT/libraries/joomla/html/parameter.php

deprecated Use JForm instead

Parameter handler

Methods

void
__construct(mixed $data = '', string $path = '') deprecated

Constructor

__clone()

Magic function to clone the registry object.

from JRegistry
string
__toString()

Magic function to render this object as a string using default args of toString method.

from JRegistry
string
def(string $key, string $default = '', string $group = '_default') deprecated

Sets a default value if not alreay assigned.

boolean
exists(string $path)

Check if a registry path exists.

from JRegistry
mixed
get(string $path, mixed $default = null)

Get a registry value.

from JRegistry
static object
getInstance(string $id)

Returns a reference to a global JRegistry object, only creating it if it doesn't already exist.

from JRegistry
boolean
loadArray(array $array)

Load a associative array of values into the default namespace

from JRegistry
boolean
loadObject(object $object)

Load the public variables of the object into the default namespace.

from JRegistry
boolean
loadFile(string $file, string $format = 'JSON', mixed $options = array())

Load the contents of a file into the registry

from JRegistry
boolean
loadString(string $data, string $format = 'JSON', mixed $options = array())

Load a string into the registry

from JRegistry
boolean
merge(object $source)

Merge a JRegistry object into this one

from JRegistry
mixed
set(string $path, mixed $value)

Set a registry value.

from JRegistry
array
toArray()

Transforms a namespace to an array

from JRegistry
object
toObject()

Transforms a namespace to an object

from JRegistry
string
toString(string $format = 'JSON', mixed $options = array())

Get a namespace in a given string format

from JRegistry
boolean
loadXML(string $data, string $namespace = null) deprecated

Load an XML string into the registry into the given namespace [or default if a namespace is not given]

from JRegistry
boolean
loadINI(string $data, string $namespace = null, mixed $options = array()) deprecated

Load an INI string into the registry into the given namespace [or default if a namespace is not given]

from JRegistry
boolean
loadJSON(string $data) deprecated

Load an JSON string into the registry into the given namespace [or default if a namespace is not given]

from JRegistry
boolean
makeNameSpace(string $namespace) deprecated

Create a namespace

from JRegistry
array
getNameSpaces() deprecated

Get the list of namespaces

from JRegistry
mixed
getValue(string $path, mixed $default = null) deprecated

Get a registry value

from JRegistry
mixed
setValue(string $path, mixed $value) deprecated

Set a registry value

from JRegistry
boolean
loadSetupFile(string $path) deprecated

Loads an XML setup file and parses it.

void
setXML(JSimpleXMLElement $xml) deprecated

Sets the XML object from custom XML files.

boolean
bind(mixed $data, string $group = '_default') deprecated

Bind data to the parameter.

string
render(string $name = 'params', string $group = '_default') deprecated

Render the form control.

array
renderToArray(string $name = 'params', string $group = '_default') deprecated

Render all parameters to an array.

mixed
getNumParams(string $group = '_default') deprecated

Return the number of parameters in a group.

array
getGroups() deprecated

Get the number of params in each group.

array
getParams(string $name = 'params', string $group = '_default') deprecated

Render all parameters.

array
getParam(object $node, string $control_name = 'params', string $group = '_default') deprecated

Render a parameter type.

object
loadElement(string $type, boolean $new = false) deprecated

Loads an element type.

void
addElementPath(mixed $path) deprecated

Add a directory where JParameter should search for element types.

Details

at line 62
void __construct(mixed $data = '', string $path = '') deprecated

deprecated 12.1

Constructor

Parameters

mixed $data The data to bind to the new JRegistry object.
string $path Path to the XML setup file.

Return Value

void

in JRegistry at line 61
JRegistry __clone()

Magic function to clone the registry object.

Return Value

JRegistry

in JRegistry at line 73
string __toString()

Magic function to render this object as a string using default args of toString method.

Return Value

string

at line 96
string def(string $key, string $default = '', string $group = '_default') deprecated

deprecated 12.1

Sets a default value if not alreay assigned.

Parameters

string $key The name of the parameter.
string $default An optional value for the parameter.
string $group An optional group for the parameter.

Return Value

string The value set, or the default if the value was not previously set (or null).

in JRegistry at line 104
boolean exists(string $path)

Check if a registry path exists.

Parameters

string $path Registry path (e.g. joomla.content.showauthor)

Return Value

boolean

in JRegistry at line 139
mixed get(string $path, mixed $default = null)

Get a registry value.

Parameters

string $path Registry path (e.g. joomla.content.showauthor)
mixed $default Optional default value, returned if the internal value is null.

Return Value

mixed Value of entry or null

in JRegistry at line 184
static object getInstance(string $id)

Returns a reference to a global JRegistry object, only creating it if it doesn't already exist.

This method must be invoked as:

$registry = JRegistry::getInstance($id);

Parameters

string $id An ID for the registry instance

Return Value

object The JRegistry object.

in JRegistry at line 208
boolean loadArray(array $array)

Load a associative array of values into the default namespace

Parameters

array $array Associative array of value to load

Return Value

boolean True on success

in JRegistry at line 224
boolean loadObject(object $object)

Load the public variables of the object into the default namespace.

Parameters

object $object The object holding the publics to load

Return Value

boolean True on success

in JRegistry at line 242
boolean loadFile(string $file, string $format = 'JSON', mixed $options = array())

Load the contents of a file into the registry

Parameters

string $file Path to file to load
string $format Format of the file [optional: defaults to JSON]
mixed $options Options used by the formatter

Return Value

boolean True on success

in JRegistry at line 262
boolean loadString(string $data, string $format = 'JSON', mixed $options = array())

Load a string into the registry

Parameters

string $data String to load into the registry
string $format Format of the string
mixed $options Options used by the formatter

Return Value

boolean True on success

in JRegistry at line 282
boolean merge(object $source)

Merge a JRegistry object into this one

Parameters

object $source &$source Source JRegistry object to merge.

Return Value

boolean True on success

in JRegistry at line 307
mixed set(string $path, mixed $value)

Set a registry value.

Parameters

string $path Registry Path (e.g. joomla.content.showauthor)
mixed $value Value of entry

Return Value

mixed The value of the that has been set.

in JRegistry at line 339
array toArray()

Transforms a namespace to an array

Return Value

array An associative array holding the namespace data

in JRegistry at line 351
object toObject()

Transforms a namespace to an object

Return Value

object An an object holding the namespace data

in JRegistry at line 366
string toString(string $format = 'JSON', mixed $options = array())

Get a namespace in a given string format

Parameters

string $format Format to return the string in
mixed $options Parameters used by the formatter, see formatters for more info

Return Value

string Namespace in string format

in JRegistry at line 445
boolean loadXML(string $data, string $namespace = null) deprecated

deprecated 12.1

Load an XML string into the registry into the given namespace [or default if a namespace is not given]

Parameters

string $data XML formatted string to load into the registry
string $namespace Namespace to load the XML string into [optional]

Return Value

boolean True on success

in JRegistry at line 463
boolean loadINI(string $data, string $namespace = null, mixed $options = array()) deprecated

deprecated 12.1

Load an INI string into the registry into the given namespace [or default if a namespace is not given]

Parameters

string $data INI formatted string to load into the registry
string $namespace Namespace to load the INI string into [optional]
mixed $options An array of options for the formatter, or boolean to process sections.

Return Value

boolean True on success

in JRegistry at line 479
boolean loadJSON(string $data) deprecated

deprecated 12.1

Load an JSON string into the registry into the given namespace [or default if a namespace is not given]

Parameters

string $data JSON formatted string to load into the registry

Return Value

boolean True on success

in JRegistry at line 495
boolean makeNameSpace(string $namespace) deprecated

deprecated 12.1

Create a namespace

Parameters

string $namespace Name of the namespace to create

Return Value

boolean True on success

in JRegistry at line 510
array getNameSpaces() deprecated

deprecated 12.1

Get the list of namespaces

Return Value

array List of namespaces

in JRegistry at line 528
mixed getValue(string $path, mixed $default = null) deprecated

deprecated 12.1

Get a registry value

Parameters

string $path Registry path (e.g. joomla.content.showauthor)
mixed $default Optional default value

Return Value

mixed Value of entry or null

in JRegistry at line 550
mixed setValue(string $path, mixed $value) deprecated

deprecated 12.1

Set a registry value

Parameters

string $path Registry Path (e.g. joomla.content.showauthor)
mixed $value Value of entry

Return Value

mixed The value after setting.

at line 324
boolean loadSetupFile(string $path) deprecated

deprecated 12.1

Loads an XML setup file and parses it.

Parameters

string $path A path to the XML setup file.

Return Value

boolean True.

at line 113
void setXML(JSimpleXMLElement $xml) deprecated

deprecated 12.1

Sets the XML object from custom XML files.

Parameters

JSimpleXMLElement $xml An XML object.

Return Value

void

at line 139
boolean bind(mixed $data, string $group = '_default') deprecated

deprecated 12.1

Bind data to the parameter.

Parameters

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.

Return Value

boolean True if the data was successfully bound, false otherwise.

at line 161
string render(string $name = 'params', string $group = '_default') deprecated

deprecated 12.1

Render the form control.

Parameters

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.

Return Value

string HTML

at line 203
array renderToArray(string $name = 'params', string $group = '_default') deprecated

deprecated 12.1

Render all parameters to an array.

Parameters

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.

Return Value

array

at line 226
mixed getNumParams(string $group = '_default') deprecated

deprecated 12.1

Return the number of parameters in a group.

Parameters

string $group An optional group. The default group is used if not supplied.

Return Value

mixed False if no params exist or integer number of parameters that exist.

at line 243
array getGroups() deprecated

deprecated 12.1

Get the number of params in each group.

Return Value

array Array of all group names as key and parameters count as value.

at line 267
array getParams(string $name = 'params', string $group = '_default') deprecated

deprecated 12.1

Render all parameters.

Parameters

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.

Return Value

array An array of all parameters, each as array of the label, the form element and the tooltip.

at line 292
array getParam(object $node, string $control_name = 'params', string $group = '_default') deprecated

deprecated 12.1

Render a parameter type.

Parameters

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.

Return Value

array Any array of the label, the form element and the tooltip.

at line 357
object loadElement(string $type, boolean $new = false) deprecated

deprecated 12.1

Loads an element type.

Parameters

string $type The element type.
boolean $new False (default) to reuse parameter elements; true to load the parameter element type again.

Return Value

object

at line 411
void addElementPath(mixed $path) deprecated

deprecated 12.1

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.

Parameters

mixed $path Directory (string) or directories (array) to search.

Return Value

void