JArrayHelper::fromObject: Difference between revisions
From Joomla! Documentation
m clean up |
m preparing for archive only |
||
| Line 4: | Line 4: | ||
Utility function to map an object to an array. | Utility function to map an object to an array. | ||
<source lang="php"> | <source lang="php"> | ||
| Line 44: | 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]] | ||
===User contributed notes=== | ===User contributed notes=== | ||
=== Code Examples === | |||
<dpl> | <dpl> | ||
noresultsheader=\n | noresultsheader=\n | ||
category=JArrayHelper::fromObject | category=JArrayHelper::fromObject | ||
namespace=CodeExample | |||
category=MethodExample | category=MethodExample | ||
include=* | include=* | ||
Latest revision as of 02:21, 25 March 2017
JArrayHelper::fromObject
Description
Utility function to map an object to an array.
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
User contributed notes
Code Examples