This class encapsulates a controlling instance of the Datamanager class system. You do not need to use it, it is possible to implement your own, custom form processing solely on the basis of form/datamanager classes. The controllers are intended to ease the integration work and provide more advanced frameworks for example for multi-page forms or AJAX callbacks.
The base class implements only a framework for controllers, along with a factory methods for getting real instances which you need to initialize. For all instances, you have to set the schema database using the load_schemadb() helper.
See the individual subclass documentations for details about the initialization procedure.
You cannot use this class directly, consider it as an abstract base class!
package | midcom.helper.datamanager2 |
---|
It takes care of loading the required class files. The returned instances will be created but not initialized.
On any error (class not found etc.) the factory method will throw midcom_error.
string
The type of the controller (the file name from the controller directory).\midcom_helper_datamanager2_controller
A reference to the newly created controller instance.string
The form identifierboolean
Indicating success.If you have an array of schema classes already, use set_schemadb() instead.
see | \midcom_helper_datamanager2_schema::load_database() |
---|
mixed
A schema database source suitable for use with
midcom_helper_datamanager2_schema::load_database()Its behavior is dependant on the controller used, see the individual class documentations for details.
string
The exitcode of the form processing, usually related to the formmanager
result constants.If you want to load a schema database from disk, use the load_schemadb method instead.
see | \load_schemadb() |
---|
array
&$schemadb The schema database to use, this must be an array of midcom_helper_datamanager2_schema
instances, which is taken by reference.You must load a schema database before actually
object
&$storage A reference to either an initialized datamanager, an initialized
storage backend or to a DBA compatible class instance.string
This is an optional schema name that should be used to edit the
storage object. If it is null, the controller will try to autodetect the schema
to use by using the datamanager's autoset_storage interface.Set this member using the set_storage() helper function unless you definitely know what you're doing.
This should always be the a single instance, even for multi-page forms. Usually, it is created by the controller class during initialization.
This is a list of midcom_helper_datamanager2_schema instances, indexed by their name. Set this member using the load_schemadb or set_schemadb helpers unless you know what you're doing.