API17

Difference between revisions of "JArrayHelper::getValue"

From Joomla! Documentation

(Bulk upload by Doxiki2)
 
m (preparing for archive only)
 
(6 intermediate revisions by 2 users not shown)
Line 4: Line 4:
 
Utility function to return a value from a named array or a specified default.  
 
Utility function to return a value from a named array or a specified default.  
  
{{Description:JArrayHelper::getValue}}
+
 
<span class="editsection" style="font-size:76%;">
+
 
<nowiki>[</nowiki>[[Description:JArrayHelper::getValue|Edit Descripton]]<nowiki>]</nowiki>
 
</span>
 
===Since===
 
{{JVer|11.1 }}
 
===Synopsis===
 
 
<source lang="php">
 
<source lang="php">
public static JArrayHelper::getValue (&$array, $name, $default=null, $type='')
+
public static function getValue (
 +
        &$array
 +
        $name
 +
        $default=null
 +
        $type=''
 +
)
 
</source>
 
</source>
 
{| class="wikitable"
 
{| class="wikitable"
Line 39: Line 39:
 
|string
 
|string
 
|''
 
|''
|Return type for the variable (INT, FLOAT, STRING, WORD, BOOLEAN, ARRAY)  
+
|Return type for the variable (INT, FLOAT, STRING, WORD, BOOLEAN, ARRAY)
 
|-
 
|-
 
|}
 
|}
===Returns===
+
* '''Returns''' mixed The value from the source array
mixed The value from the source array
+
* '''Defined''' on line 204 of libraries/joomla/utilities/arrayhelper.php
===Defined in===
+
* '''Since''' {{JVer|11.1 }}
libraries/joomla/utilities/arrayhelper.php
+
* '''Referenced by'''
===Referenced by===
+
** [[API17:JUser::bind|JUser::bind]]
* [[JUser/bind/11.1|JUser::bind]]
+
** [[API17:JModelForm::loadForm|JModelForm::loadForm]]
* [[JModelForm/loadForm/11.1|JModelForm::loadForm]]
+
** [[API17:JControllerAdmin::publish|JControllerAdmin::publish]]
* [[JControllerAdmin/publish/11.1|JControllerAdmin::publish]]
 
 
===See also===
 
===See also===
<span class="editsection" style="font-size:76%;">
+
* {{JVer|11.1}} '''JArrayHelper::getValue source code''' on [[jplatform:utilities/arrayhelper.php#cl-196|BitBucket]]
<nowiki>[</nowiki>[[SeeAlso:JArrayHelper::getValue|Edit See Also]]<nowiki>]</nowiki>
+
* {{JVer|11.1}} Class [[API17:JArrayHelper|JArrayHelper]]
</span>
+
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]]
* [[JArrayHelper/11.1|JArrayHelper]]
+
* [[API17:JArrayHelper::getValue|Other versions of JArrayHelper::getValue]]
* [[JArrayHelper::getValue|Other versions of this method]]
+
 
{{SeeAlso:JArrayHelper::getValue}}
+
 
===Examples===
+
===User contributed notes===
<CodeExamplesForm />
+
=== Code Examples ===
 
<dpl>
 
<dpl>
 
noresultsheader=\n
 
noresultsheader=\n
 
category=JArrayHelper::getValue
 
category=JArrayHelper::getValue
category=CodeExample
+
namespace=CodeExample
 
category=MethodExample
 
category=MethodExample
 
include=*
 
include=*
 +
namespace=CodeExample
 
format= ,,,
 
format= ,,,
 
</dpl>
 
</dpl>
<noinclude>[[Category:JArrayHelper]][[Category:JArrayHelper::getValue]]</noinclude>
+
<noinclude>[[Category:Platform 11.1]][[Category:Archived pages API17]]</noinclude>

Latest revision as of 21:21, 24 March 2017

The "API17" 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.

Joomla 11.1 JArrayHelper::getValue[edit]

Description[edit]

Utility function to return a value from a named array or a specified default.


public static function getValue (
        &$array
        $name
        $default=null
        $type=''
)
Parameter Type Default Description
&$array array $array A named array
$name string The key to search for
$default mixed null The default value to give if no key found
$type string Return type for the variable (INT, FLOAT, STRING, WORD, BOOLEAN, ARRAY)

See also[edit]


User contributed notes[edit]

Code Examples[edit]