Class Ulaform_Driver_Sql
Ulaform_Driver_Sql Class
Copyright 2003-2012 Horde LLC (http://www.horde.org/)
See the enclosed file COPYING for license information (GPL). If you
did not receive this file, see http://www.horde.org/licenses/gpl.
-
Ulaform_Driver
-
Ulaform_Driver_Sql
Methods summary
public
|
#
__construct( array $params = array() )
Construct a new SQL storage object.
Construct a new SQL storage object.
Parameters
- $params
- The connection parameters
Throws
InvalidArguementException
Overrides
|
public
integer
|
#
saveForm( array & $info )
Saves the passed form into the db, either inserting a
new form if no form_id is available, or updating an
existing form if a form_id has been passed.
Saves the passed form into the db, either inserting a
new form if no form_id is available, or updating an
existing form if a form_id has been passed.
Parameters
- $info
- An array with the form details.
Returns
integer The form id.
Throws
|
public
boolean
|
#
saveField( array & $info )
Saves the passed field into the db, either inserting
a new field if no field_id is available, or updating
an existing field if a field_id has been passed.
If no form_id is available will throw an exception.
Saves the passed field into the db, either inserting
a new field if no field_id is available, or updating
an existing field if a field_id has been passed.
If no form_id is available will throw an exception.
Parameters
- $info
- $params An array with the field details.
Returns
boolean True on success.
Throws
|
public
boolean
|
#
sortFields( array & $info )
Sets the specified sort order to the fields in a form.
Sets the specified sort order to the fields in a form.
Parameters
- $info
- <p>An array with the field ids in
a specific order.</p>
Returns
boolean True on success.
Throws
|
public
array
|
#
getForms( mixed $form_id = null )
Fetches the a list of available forms and the basic data.
Fetches the a list of available forms and the basic data.
Returns
array An array of the available forms.
Throws
|
public
array
|
#
getAvailableForms( )
Fetches the a list of available forms to use.
Fetches the a list of available forms to use.
Returns
array An array of the available forms.
Throws
|
public
array
|
#
getForm( integer $form_id, mixed $permission = Horde_Perms::SHOW )
Fetches all the data specific to the supplied form id.
Fetches all the data specific to the supplied form id.
Parameters
- $form_id
- The form id of the form to return.
- $permission
-
Returns
array The form data.
Throws
|
public
array
|
#
getFields( integer $form_id, mixed $field_id = null )
Fetches the fields for a particular form.
Fetches the fields for a particular form.
Parameters
- $form_id
- The form id of the form to return.
- $field_id
-
Returns
array The fields.
Throws
|
public
boolean
|
#
deleteForm( integer $form_id )
Deletes a form and all of its fields from the database.
Deletes a form and all of its fields from the database.
Parameters
- $form_id
- The form id of the form to delete.
Returns
boolean True on success.
Throws
|
public
boolean
|
#
deleteField( integer $field_id )
Deletes a field from the database.
Deletes a field from the database.
Parameters
- $field_id
- The field id of the field to delete.
Returns
boolean True on success.
Throws
|