Datamanager 2 Data storage implementation: Null storage object.

This class is aimed to provide a dummy storage object, useable for stuff like mailback forms. Usually, you won't save datamanagers running with this storage backend, accessing the types values directly. The type's convert_to_storage helper functions can be a nice help if you need string representations.

Special care has to be taken when attachments are being used with this type. Since $object is always null by default, types working on attachments must create a temporary object before going on. This implementation does not work with such an object instance for any data i/o operations except those invoked by the types directly on it. This especially means, that any store operation will still fail on this implementation for all regular types not working on $object directly.

Also, there is no code whatsoever involved, which does the transition of a temporary storage object through multiple requests. You need to set $object accordingly yourself.

package midcom.helper.datamanager2

 Methods

__construct (\midcom_helper_datamanager2_schema $schema, array $defaults)

TODO

Parameters

$schema

\midcom_helper_datamanager2_schema&$schema The data schema to use for processing.

$defaults

arrayThe defaults to use as "artificial" storage. This can be omitted safely.

_on_load_data ($name)

This returns the defaults set.

null is used for unset defaults.

Parameters

$name

_on_store_data ($name, $data)

We don't store anything, this can be safely ignored therefore.

Parameters

$name

$data

_on_update_object ()

We do as if we can store successfully at all times.

 Properties

 

Array $_defaults

The defaults to use when loading the data from the "artificial" storage.