Difference between revisions of "JArrayHelper::toObject"
From Joomla! Documentation
(Layout updates) |
(Updated to r1448:247ba8d88526) |
||
Line 8: | Line 8: | ||
<nowiki>[</nowiki>[[Description:JArrayHelper::toObject|Edit Descripton]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[Description:JArrayHelper::toObject|Edit Descripton]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | |||
− | |||
− | |||
<source lang="php"> | <source lang="php"> | ||
− | public static | + | public static function toObject ( |
+ | &$array | ||
+ | $class= 'stdClass' | ||
+ | ) | ||
</source> | </source> | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 29: | Line 29: | ||
|string | |string | ||
|'stdClass' | |'stdClass' | ||
− | | | + | |Name of the class to create |
|- | |- | ||
|} | |} | ||
− | + | * '''Returns''' object The object mapped from the given array | |
− | object The object mapped from the given array | + | * '''Defined''' on line 58 of libraries/joomla/utilities/arrayhelper.php |
− | + | * '''Since''' {{JVer|11.1 }} | |
− | libraries/joomla/utilities/arrayhelper.php | + | * '''Referenced by''' |
− | * | + | ** [[JModelAdmin::getItem/11.1|JModelAdmin::getItem]] |
− | |||
− | * [[JModelAdmin::getItem/11.1|JModelAdmin::getItem]] | ||
===See also=== | ===See also=== | ||
+ | * {{JVer|11.1}} '''JArrayHelper::toObject source code''' on [[jplatform:utilities/arrayhelper.php#cl-50|BitBucket]] | ||
+ | * {{JVer|11.1}} Class [[JArrayHelper/11.1|JArrayHelper]] | ||
+ | * {{JVer|11.1}} Subpackage [[Subpackage_Utilities/11.1|Utilities]] | ||
+ | * [[JArrayHelper::toObject|Other versions of JArrayHelper::toObject]] | ||
+ | {{SeeAlso:JArrayHelper::toObject}} | ||
<span class="editsection" style="font-size:76%;"> | <span class="editsection" style="font-size:76%;"> | ||
<nowiki>[</nowiki>[[SeeAlso:JArrayHelper::toObject|Edit See Also]]<nowiki>]</nowiki> | <nowiki>[</nowiki>[[SeeAlso:JArrayHelper::toObject|Edit See Also]]<nowiki>]</nowiki> | ||
</span> | </span> | ||
− | + | ===User contributed notes=== | |
− | |||
− | |||
− | === | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
<dpl> | <dpl> | ||
Line 54: | Line 54: | ||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
+ | namespace=CodeExample | ||
format= ,,, | format= ,,, | ||
</dpl> | </dpl> | ||
<noinclude>[[Category:JArrayHelper]][[Category:JArrayHelper::toObject]]</noinclude> | <noinclude>[[Category:JArrayHelper]][[Category:JArrayHelper::toObject]]</noinclude> |
Revision as of 20:11, 27 April 2011
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.
JArrayHelper::toObject[edit]
Description[edit]
Utility function to map an array to a stdClass object.
Template:Description:JArrayHelper::toObject [Edit Descripton]
public static function toObject (
&$array
$class= 'stdClass'
)
Parameter | Type | Default | Description |
---|---|---|---|
&$array | array | $array The array to map. | |
$class | string | 'stdClass' | Name of the class to create |
- Returns object The object mapped from the given array
- Defined on line 58 of libraries/joomla/utilities/arrayhelper.php
- Since
- Referenced by
See also[edit]
- JArrayHelper::toObject source code on BitBucket
- Class JArrayHelper
- Subpackage Utilities
- Other versions of JArrayHelper::toObject
Template:SeeAlso:JArrayHelper::toObject [Edit See Also]
User contributed notes[edit]
<CodeExamplesForm />