Class JParameter

Description

Parameter handler

Located in /parameter/parameter.php (line 24)

JObject
   |
   --JRegistry
      |
      --JParameter
Direct descendents
Class Description
 class mosParameters Legacy class, use JParameter instead
Variable Summary
 array $_elements
 string $_raw
 object $_xml
Method Summary
 JParameter __construct (string $data, [string $path = ''])
 void addParameterDir (string|array $dir)
 string def (string $key, [string $value = ''])
 string get (string $key, [mixed $default = ''])
 string getIncludePath ()
 object &loadElement (string $type, [mixed $new = false])
 object loadSetupFile (string $path)
 string render ([string $name = 'params'])
 array renderParam (object A &$node, [string $control_name = 'params'])
 string set (string $key, [string $value = ''])
Variables
array $_elementDirs = array() (line 56)

directories, where element types can be stored

  • access: private
array $_elements = array() (line 48)

loaded elements

  • access: private
string $_raw = null (line 32)

The raw params string

  • access: private
object $_xml = null (line 40)

The xml params element

  • access: private

Inherited Variables

Inherited from JRegistry

JRegistry::$_defaultNameSpace
JRegistry::$_registry
Methods
Constructor __construct (line 66)

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

Redefined in descendants as:
addParameterDir (line 290)

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.1
  • access: public
void addParameterDir (string|array $dir)
  • string|array $dir: directory or directories to search.
def (line 114)

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

Get a value

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

Redefinition of:
JObject::get()
getIncludePath (line 305)

Get the include path

  • since: 1.1
  • access: public
string getIncludePath ()
loadElement (line 227)

Loads a element type

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

Loads an xml setup file and parses it

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

Render

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

render a parameter type

  • return: Any array of the label, the form element and the tooltip
array renderParam (object A &$node, [string $control_name = 'params'])
  • object A &$node: param tag node
  • string $control_name: The control name
set (line 88)

Set a value

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

Redefinition of:
JObject::set()

Inherited Methods

Inherited From JRegistry

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

Inherited From JObject

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

Documentation generated on Sat, 4 Feb 2006 14:25:47 +0100 by phpDocumentor 1.3.0RC4