API16

JParameter/bind: Difference between revisions

From Joomla! Documentation

m clean up
m preparing for archive only
 
Line 4: Line 4:




{{subst:Description:JParameter/bind}}
 


===Syntax===
===Syntax===
Line 47: Line 47:




{{subst:SeeAlso:JParameter/bind}}
 


===Examples===
===Examples===
<CodeExamplesForm />
=== Code Examples ===
<dpl>
<dpl>
  noresultsheader=\n
  noresultsheader=\n
  category=bind
  category=bind
  category=JParameter
  category=JParameter
  category=CodeExample
  namespace=CodeExample
  category=MethodExample
  category=MethodExample
  include=*
  include=*
  format= ,,,
  format= ,,,
</dpl>
</dpl>

Latest revision as of 01:58, 25 March 2017

Description

Bind data to the parameter.



Syntax

bind($data, $group= '_default')
Parameter Name Default Value Description
$data $data Array or Object.
$group '_default'

Returns

boolean True if the data was successfully bound.

Defined in

libraries/joomla/html/parameter.php

Importing

jimport( 'joomla.html.parameter' );

Source Body

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

Code Examples