jSoapObject
in package
classes that are mapped to soap types could inherits from this object in order to have some helpers and a better mapping than the default soap mapper.
Table of Contents
- $_mapArray : array<string|int, mixed>
- list of properties that are virtually an array of 0,1 or more elements.
- $_vProp : mixed
- virtual properties.
- __construct() : mixed
- you can give a jFormsBase or an array, containing values that will be mapped to properties of the object.
- __get() : mixed
- magic getter for properties that are not explicitely defined.
- __isset() : mixed
- __set() : mixed
- magic setter for properties that are not explicitely defined.
- __unset() : mixed
- _fillForm() : mixed
- set the form content with the object properties.
- _getData() : mixed
- getter used by _fillForm and _initFromArray.
- _initFromArray() : mixed
- hydrate the object with values stored into the given associative array. Keys should be name of properties.
- _setData() : mixed
- setter used by _fillForm and _initFromArray.
Properties
$_mapArray
list of properties that are virtually an array of 0,1 or more elements.
protected
array<string|int, mixed>
$_mapArray
= array()
When we try to retrieve one of these properties, we will have always an array, even if the soap result did not populate the property, or gave only one object. These properties should not be declared explicitely as PHP properties.
$_vProp
virtual properties.
protected
mixed
$_vProp
= array()
Methods
__construct()
you can give a jFormsBase or an array, containing values that will be mapped to properties of the object.
public
__construct([array<string|int, mixed>|jFormsBase $data = null ]) : mixed
Note that SoapClient do not call the constructor when it does the mapping with soap results.
Parameters
- $data : array<string|int, mixed>|jFormsBase = null
-
data to hydrate the object
Tags
Return values
mixed —__get()
magic getter for properties that are not explicitely defined.
public
__get(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —an array for properties list in _mapArray, null for others
__isset()
public
__isset(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —__set()
magic setter for properties that are not explicitely defined.
public
__set(mixed $name, mixed $value) : mixed
check if the given property is registered into _mapArray.
Parameters
- $name : mixed
- $value : mixed
Return values
mixed —__unset()
public
__unset(mixed $name) : mixed
Parameters
- $name : mixed
Return values
mixed —_fillForm()
set the form content with the object properties.
public
_fillForm(jFormsBase $form) : mixed
Only controls of the form that have the same name of object properties, are set. You can override this methods to do specific settings.
Parameters
- $form : jFormsBase
Return values
mixed —_getData()
getter used by _fillForm and _initFromArray.
public
_getData(string $key) : mixed
Override it to do specific processing before returning the value.
Parameters
- $key : string
-
the name of the property to get
Return values
mixed —the value
_initFromArray()
hydrate the object with values stored into the given associative array. Keys should be name of properties.
public
_initFromArray(array<string|int, mixed> &$data) : mixed
You can override this method if you want to do specific processing on given values before to set properties.
Parameters
- $data : array<string|int, mixed>
Return values
mixed —_setData()
setter used by _fillForm and _initFromArray.
public
_setData(string $key, mixed $value) : mixed
Override it to do specific setting.
Parameters
- $key : string
-
the name of the property to set
- $value : mixed
-
the value of the property