It implements the basic interface required for data storage operations. Naturally, only the construction of storage backends is suspect to class specific code, the actual operation should be completely transparent across all storage implementations.
See the individual subclasses for details about their operation.
package | midcom.helper.datamanager2 |
---|
Specific storage implementation subclasses will need to expand this constructor to take care of linking to the right storage object, where applicable.
\midcom_helper_datamanager2_schema
&$schema The data schema to use for processing.It has to store the given data to the schema field identified by the given name.
string
The name of the field to load from.mixed
$data The data which has been loaded.It has to store the given data to the schema field identified by the given name.
string
The name of the field to save to.mixed
The data to save to.You need to store it to the database at this point.
boolean
Indicating success.If there is no valid storage backend, a can_user_do is performed. Subclasses may overwrite this method to incorporate for creation mode stuff.
string
The privilege to check against.boolean
true if the user has the permission, false otherwise.The code using this storage instance must take care of transitting this temporary object into future sessions (which means switching to another storage backend at that point).
If the storage object is already populated, the method will exit silently.
see | \midcom_services_tmp |
---|---|
see | \midcom_core_temporary_object |
This is done by subclass implementations, where this function serves as a request switch.
Any types defined in the schema but not found in the passed type listing are ignored unless they are flagged as required, in which case midcom_error is thrown.
array
&$types A reference to an array of types matching the schema definition.This is done by subclass implementations, where this function serves as a request switch.
Any types defined in the schema but not found in the passed type listing are ignored unless they are flagged as required, in which case midcom_error is called.
array
&$types A reference to an array of types matching the schema definition.boolean
Indicating success.access | protected |
---|
Types may use this reference only for attachment operations and parameter operations related to attachment operations.
It can be safely considered that a MidCOM DBA object is available here if the reference is non-null.
Since this member is not necessarily populated in all cases, the base API provides callers with a create_temporary_object helper function: It will put a temporary object into $object, so that attachment operations can still be done. The storage object user must take care of the information stored on that object.