jSoapObject

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

package

jelix

Methods

you can give a jFormsBase or an array, containing values that will be mapped to properties of the object.

__construct(array|\jFormsBase $data = null) 

Note that SoapClient do not call the constructor when it does the mapping with soap results.

see \soapObject::_initFromArray

Arguments

$data

array|\jFormsBase

data to hydrate the object

magic getter for properties that are not explicitely defined.

__get( $name) : mixed

Arguments

$name

Response

mixed

an array for properties list in _mapArray, null for others

__isset

__isset( $name) 

Arguments

$name

magic setter for properties that are not explicitely defined.

__set( $name,  $value) 

check if the given property is registered into _mapArray

Arguments

$name

$value

__unset

__unset( $name) 

Arguments

$name

set the form content with the object properties.

_fillForm(\jFormsBase $form) 

Only controls of the form that have the same name of object properties, are set. You can override this methods to do specific settings.

Arguments

$form

\jFormsBase

getter used by _fillForm and _initFromArray.

_getData(string $key) : mixed

Override it to do specific processing before returning the value.

Arguments

$key

string

the name of the property to get

Response

mixed

the value

hydrate the object with values stored into the given associative array. Keys should be name of properties.

_initFromArray(array &$data) 

You can override this method if you want to do specific processing on given values before to set properties.

Arguments

$data

array

setter used by _fillForm and _initFromArray.

_setData(string $key, mixed $value) 

Override it to do specific setting.

Arguments

$key

string

the name of the property to set

$value

mixed

the value of the property

Properties

list of properties that are virtually an array of 0,1 or more elements.

_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.

var

Type(s)

array

virtual properties

_vProp : 

Type(s)