Support Joomla!

Packages

Package: Joomla-Framework

License

Content on this site is copyright © 2005 - 2008 Open Source Matters Inc and can be used in accordance with the Joomla! Electronic Documentation License. Some parts of this website may be subject to other licenses.

 Class JParameter

Description

Parameter handler

  • since: 1.5

Located in /joomla/html/parameter.php (line 30)

Class JObject   (Subpackage Base)

Class JRegistry   (Subpackage Registry)
   
   Class JParameter   (Subpackage Parameter)
Method Summary
Constructor JParameter __construct (string $data, [string $path = ''])
Method void addElementPath (string|array $path)
Method boolean bind (mixed $data, [ $group = '_default'])
Method string def (string $key, [string $default = ''], [string $group = '_default'])
Method string get (string $key, [mixed $default = ''], [ $group = '_default'])
Method array getGroups ()
Method mixed getNumParams ([ $group = '_default'])
Method array getParam (object A &$node, [string $control_name = 'params'], [ $group = '_default'])
Method array getParams ([string $name = 'params'], [ $group = '_default'])
Method object &loadElement (string $type, [ $new = false])
Method object loadSetupFile (string $path)
Method string render ([string $name = 'params'], [ $group = '_default'])
Method array renderToArray ([string $name = 'params'], [ $group = '_default'])
Method string set (string $key, [string $value = ''], [ $group = '_default'])
Method void setXML (object An &$xml)
Variables

Inherited Variables

Inherited from JRegistry

Variable JRegistry::$_defaultNameSpace
Variable JRegistry::$_registry

Inherited from JObject

Variable JObject::$_errors
Methods
Constructor __construct (line 76)

Constructor

  • since: 1.5
  • access: protected
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
addElementPath (line 431)

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.

  • since: 1.5
  • access: public
void addElementPath (string|array $path)
  • string|array $path: directory or directories to search.
bind (line 169)

Bind data to the parameter

  • return: True if the data was successfully bound
  • since: 1.5
  • access: public
boolean bind (mixed $data, [ $group = '_default'])
  • mixed $data: Array or Object
  • $group
def (line 134)

Sets a default value if not alreay assigned

  • return: The set value
  • since: 1.5
  • access: public
string def (string $key, [string $default = ''], [string $group = '_default'])
  • string $key: The name of the param
  • string $default: The value of the parameter
  • string $group: The parameter group to modify
get (line 117)

Get a value

  • since: 1.5
  • access: public
string get (string $key, [mixed $default = ''], [ $group = '_default'])
  • string $key: The name of the param
  • mixed $default: The default value if not found
  • $group

Redefinition of:
JObject::get()
Returns a property of the object or the default value if the property is not set.
getGroups (line 271)

Get the number of params in each group

  • return: Array of all group names as key and param count as value
  • since: 1.5
  • access: public
array getGroups ()
getNumParams (line 255)

Return number of params to render

  • return: Boolean falst if no params exist or integer number of params that exist
  • since: 1.5
  • access: public
mixed getNumParams ([ $group = '_default'])
  • $group
getParam (line 311)

Render a parameter type

  • return: Any array of the label, the form element and the tooltip
  • since: 1.5
array getParam (object A &$node, [string $control_name = 'params'], [ $group = '_default'])
  • object A &$node: param tag node
  • string $control_name: The control name
  • $group
getParams (line 291)

Render all parameters

  • return: Aarray of all parameters, each as array Any array of the label, the form element and the tooltip
  • since: 1.5
  • access: public
array getParams ([string $name = 'params'], [ $group = '_default'])
  • string $name: The name of the control, or the default text area if a setup file is not found
  • $group
loadElement (line 380)

Loads a element type

  • since: 1.5
  • access: public
object &loadElement (string $type, [ $new = false])
  • string $type: elementType
  • $new
loadSetupFile (line 345)

Loads an xml setup file and parses it

  • since: 1.5
  • access: public
object loadSetupFile (string $path)
  • string $path: path to xml setup file
render (line 188)

Render

  • return: HTML
  • since: 1.5
  • access: public
string render ([string $name = 'params'], [ $group = '_default'])
  • string $name: The name of the control, or the default text area if a setup file is not found
  • $group
renderToArray (line 235)

Render all parameters to an array

  • return: Array of all parameters, each as array Any array of the label, the form element and the tooltip
  • since: 1.5
  • access: public
array renderToArray ([string $name = 'params'], [ $group = '_default'])
  • string $name: The name of the control, or the default text area if a setup file is not found
  • $group
set (line 103)

Set a value

  • return: The set value
  • since: 1.5
  • access: public
string set (string $key, [string $value = ''], [ $group = '_default'])
  • string $key: The name of the param
  • string $value: The value of the parameter
  • $group

Redefinition of:
JObject::set()
Modifies a property of the object, creating it if it does not already exist.
setXML (line 146)

Sets the XML object from custom xml files

  • since: 1.5
  • access: public
void setXML (object An &$xml)
  • object An &$xml: XML object

Inherited Methods

Inherited From JRegistry

 JRegistry::__construct()
 JRegistry::getInstance()
 JRegistry::getNameSpaces()
 JRegistry::getValue()
 JRegistry::loadArray()
 JRegistry::loadFile()
 JRegistry::loadINI()
 JRegistry::loadObject()
 JRegistry::loadXML()
 JRegistry::makeNameSpace()
 JRegistry::merge()
 JRegistry::setValue()
 JRegistry::toArray()
 JRegistry::toObject()
 JRegistry::toString()
 JRegistry::__clone()

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getError()
 JObject::getErrors()
 JObject::getProperties()
 JObject::getPublicProperties()
 JObject::set()
 JObject::setError()
 JObject::setProperties()
 JObject::toString()

Documentation generated on Sat, 14 Nov 2009 11:16:43 +0000 by phpDocumentor 1.3.1