Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: Joomla-Framework

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5

 Class JParameter

Description

Parameter handler

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

Class JObject   (Subpackage Base)

Class JRegistry   (Subpackage Registry)
   
   Class JParameter   (Subpackage Parameter)
Method Summary
Constructor JParameter __construct (string $data, [string $path = ''])
Method void addParameterDir (string|array $dir)
Method boolean bind (mixed $data, [ $group = '_default'])
Method string def (string $key, [string $value = ''])
Method string get (string $key, [mixed $default = ''], [ $group = '_default'])
Method array getGroups ()
Method string getIncludePath ()
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
Methods
Constructor __construct (line 70)

Constructor

  • var: The type of setup file
  • 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
addParameterDir (line 428)

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 addParameterDir (string|array $dir)
  • string|array $dir: directory or directories to search.
bind (line 158)

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 126)

Sets a default value if not alreay assigned

  • return: The set value
  • access: public
string def (string $key, [string $value = ''])
  • string $key: The name of the param
  • string $value: The value of the parameter
get (line 111)

Get a value

  • 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 255)

Get the number of params in each group

  • return: of all group names as key and param count as value
  • access: public
array getGroups ()
getIncludePath (line 444)

Get the include path

  • since: 1.5
  • access: public
string getIncludePath ()
getNumParams (line 240)

Return number of params to render

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

Render a parameter type

  • return: Any array of the label, the form element and the tooltip
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 274)

Render all parameters

  • return: of all parameters, each as array Any array of the label, the form element and the tooltip
  • 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 364)

Loads a element type

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

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 178)

Render

  • return: HTML
  • 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 221)

Render all parameters to an array

  • return: of all parameters, each as array Any array of the label, the form element and the tooltip
  • 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 97)

Set a value

  • return: The set value
  • 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 135)

Sets the XML object from custom xml files

  • 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()

Inherited From JObject

 JObject::JObject()
 JObject::__construct()
 JObject::get()
 JObject::getPublicProperties()
 JObject::set()
 JObject::toString()

Documentation generated on Mon, 05 Mar 2007 21:13:11 +0000 by phpDocumentor 1.3.1