Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

FormSync Class Reference

Inheritance diagram for FormSync:

Form List of all members.

Public Member Functions

 __construct ($layout=null)
 Constructor.
 __set ($name, $value)
 Magic setter.
 handleSubmit ($redir=null)
 Handle the form submittal.
 handleSubmitWithCallback ($callback, $redir=null)
 Handle the form submittal by calling a callback function.
 sync (&$dbConn=null)
 Sync the values to the database.

Static Public Member Functions

 assertIsDbObject (&$obj)
 Check if an object is a valid PEAR DB object.

Protected Member Functions

 drawHiddenFields ()

Private Attributes

 $table
 Table name in the database that this form is acting upon.
 $id
 ID in the table to use.
 $dbConn
 Database connection object.

Member Function Documentation

FormSync::__construct layout = null  ) 
 

Constructor.

Parameters:
$layout Optional Layout object to use

Reimplemented from Form.

Definition at line 10 of file sync.inc.php.

FormSync::__set name,
value
 

Magic setter.

Parameters:
$name Name of member
$value Value to set

Reimplemented from Form.

Definition at line 28 of file sync.inc.php.

FormSync::assertIsDbObject &$  obj  )  [static]
 

Check if an object is a valid PEAR DB object.

Parameters:
$obj Object to check

Definition at line 100 of file sync.inc.php.

FormSync::drawHiddenFields  )  [protected]
 

Definition at line 149 of file sync.inc.php.

FormSync::handleSubmit redir = null  ) 
 

Handle the form submittal.

Parameters:
$redir URL to redirect to on successful submitting.

Definition at line 52 of file sync.inc.php.

References Form::hasError(), Form::isSubmitted(), sync(), and Form::validate().

FormSync::handleSubmitWithCallback callback,
redir = null
 

Handle the form submittal by calling a callback function.

Parameters:
$callback Name of callback function. Will be passed the output of getData
$redir URL to redirect to on successful handling (only redirected to if the callback function returns true)

Definition at line 73 of file sync.inc.php.

References Form::hasError(), Form::isSubmitted(), and Form::validate().

FormSync::sync &$  dbConn = null  ) 
 

Sync the values to the database.

Parameters:
$dbConn object of PEAR DB to use for database interaction, if null $GLOBALS['dbconn'] is used

Definition at line 113 of file sync.inc.php.

References $dbConn.

Referenced by handleSubmit().


Member Data Documentation

FormSync::$dbConn [private]
 

Database connection object.

Definition at line 8 of file sync.inc.php.

Referenced by sync().

FormSync::$id [private]
 

ID in the table to use.

Definition at line 7 of file sync.inc.php.

FormSync::$table [private]
 

Table name in the database that this form is acting upon.

Definition at line 6 of file sync.inc.php.


The documentation for this class was generated from the following file:
Generated on Fri Oct 27 12:26:41 2006 for BaseJumper by doxygen 1.3.9.1