JArrayHelper::fromObject: Difference between revisions
From Joomla! Documentation
m →See also: moving preparation |
m clean up |
||
| Line 4: | Line 4: | ||
Utility function to map an object to an array. | Utility function to map an object to an array. | ||
{{Description:JArrayHelper::fromObject}} | {{subst:Description:JArrayHelper::fromObject}} | ||
<source lang="php"> | <source lang="php"> | ||
public static function fromObject ( | public static function fromObject ( | ||
| Line 46: | Line 44: | ||
* {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] | * {{JVer|11.1}} Subpackage [[API17:Subpackage_Utilities|Utilities]] | ||
* [[API17:JArrayHelper::fromObject|Other versions of JArrayHelper::fromObject]] | * [[API17:JArrayHelper::fromObject|Other versions of JArrayHelper::fromObject]] | ||
{{SeeAlso:JArrayHelper::fromObject}} | {{subst:SeeAlso:JArrayHelper::fromObject}} | ||
===User contributed notes=== | ===User contributed notes=== | ||
<CodeExamplesForm /> | <CodeExamplesForm /> | ||
Revision as of 14:46, 24 March 2017
JArrayHelper::fromObject
Description
Utility function to map an object to an array.
{{subst:Description:JArrayHelper::fromObject}}
public static function fromObject (
$p_obj
$recurse=true
$regex=null
)
| Parameter | Type | Default | Description |
|---|---|---|---|
| $p_obj | object | The source object | |
| $recurse | boolean | true | True to recurve through multi-level objects |
| $regex | string | null | An optional regular expression to match on field names |
- Returns array The array mapped from the given object
- Defined on line 105 of libraries/joomla/utilities/arrayhelper.php
- Since

See also
JArrayHelper::fromObject source code on BitBucket
Class JArrayHelper
Subpackage Utilities- Other versions of JArrayHelper::fromObject
{{subst:SeeAlso:JArrayHelper::fromObject}}
User contributed notes
<CodeExamplesForm />