Difference between revisions of "JParameter/bind"
From Joomla! Documentation
< API16:JParameter
(New page: ===Description===
Bind data to the parameter.
<span class="editsection" style="font-size:76%;">
<nowiki>[</nowiki>Edit Descripton<nowiki>]</nowiki>
</...) |
m (preparing for archive only) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
Bind data to the parameter. | Bind data to the parameter. | ||
− | |||
− | |||
− | |||
− | + | ||
+ | |||
===Syntax=== | ===Syntax=== | ||
Line 48: | Line 46: | ||
</source> | </source> | ||
− | + | ||
− | + | ||
− | |||
− | |||
===Examples=== | ===Examples=== | ||
− | + | === Code Examples === | |
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=bind | category=bind | ||
category=JParameter | category=JParameter | ||
− | + | namespace=CodeExample | |
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> |
Latest revision as of 20:58, 24 March 2017
The "API16" namespace is an archived namespace. This page contains information for a Joomla! version which is no longer supported. It exists only as a historical reference, it will not be improved and its content may be incomplete and/or contain broken links.
Description[edit]
Bind data to the parameter.
Syntax[edit]
bind($data, $group= '_default')
Parameter Name | Default Value | Description |
---|---|---|
$data | $data Array or Object. | |
$group | '_default' |
Returns[edit]
boolean True if the data was successfully bound.
Defined in[edit]
libraries/joomla/html/parameter.php
Importing[edit]
jimport( 'joomla.html.parameter' );
Source Body[edit]
public function bind($data, $group = '_default')
{
if (is_array($data)) {
return $this->loadArray($data, $group);
} elseif (is_object($data)) {
return $this->loadObject($data, $group);
} else {
return $this->loadJSON($data, $group);
}
}
Examples[edit]
Code Examples[edit]