blueshoes php application framework and cms            core_html
[ class tree: core_html ] [ index: core_html ] [ all elements ]

Class: Bs_FormHandler

Source Location: /core/html/form/Bs_FormHandler.class.php

Class Overview

Bs_Object
   |
   --Bs_FormHandler

Form Handler Class loads and persists html forms from/to the [mysql] database.


Author(s):

Version:

  • 4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:39 $

Copyright:

  • blueshoes.org

Variables

Methods


Inherited Variables

Inherited Methods

Class: Bs_Object

Bs_Object::Bs_Object()
Bs_Object::getErrors()
Basic error handling: Get *all* errors as string array from the global Bs_Error-error stack.
Bs_Object::getLastError()
Basic error handling: Get last error string from the global Bs_Error-error stack.
Bs_Object::getLastErrors()
Basic error handling: Get last errors string array from the global Bs_Error-error stack sinc last call of getLastErrors().
Bs_Object::persist()
Persists this object by serializing it and saving it to a file with unique name.
Bs_Object::setError()
Basic error handling: Push an error string on the global Bs_Error-error stack.
Bs_Object::toHtml()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::toString()
Dumps the content of this object to a string using PHP's var_dump().
Bs_Object::unpersist()
Fetches an object that was persisted with persist()

Class Details

[line 21]
Form Handler Class loads and persists html forms from/to the [mysql] database.

dependencies: Bs_Form (which starts a chain of includes)




Tags:

copyright:  blueshoes.org
pattern:  singleton: (pseudostatic)
access:  public
version:  4.3.$Revision: 1.3 $ $Date: 2003/10/29 17:48:39 $
author:  andrej arn <at blueshoes dot org>


[ Top ]


Class Variables

$form =

[line 37]

instance of bs_form



Tags:

access:  public

Type:   object


[ Top ]

$_postVars =

[line 42]

reference to $GLOBALS['HTTP_POST_VARS']


Type:   mixed


[ Top ]



Class Methods


constructor Bs_FormHandler [line 72]

Bs_FormHandler Bs_FormHandler( mixed $formNameId, [object $bsDb = NULL])

Constructor.



Parameters:

mixed   $formNameId   one of string: the internally used form name. int: the internally used form ID.
object   $bsDb   an instance of bs_mysql (bs_db) if you want to use a custom db object, the globally one is used instead. pass it byref if you can.

[ Top ]

method go [line 92]

string go( [bool $doLoadForm = TRUE])

this method does it all itself.



Tags:

return:  the whole form as html code.
throws:  bs_exception
access:  public


Parameters:

bool   $doLoadForm   default is TRUE. it may be needed that you do loadForm() yourself, do something with the form, and then call this method.

[ Top ]

method loadForm [line 148]

bool loadForm( )



Tags:

access:  public


[ Top ]

method setLanguage [line 179]

void setLanguage( [string $lang = 'en'])

sets the language for this form handler. if the form already exists, it's passed along. otherwise it is used as soon as the form object is instanced.



Tags:

see:  var $_language
access:  public


Parameters:

string   $lang   default is 'en'

[ Top ]

method setMode [line 193]

void setMode( [string $mode = ''])

sets the mode. one of 'add', 'edit', 'delete'. if the form already exists, it's passed along. otherwise it is used as soon as the form object is instanced.



Tags:

see:  var $_mode
access:  public


Parameters:

string   $mode   default is ''

[ Top ]


Documentation generated on Mon, 29 Dec 2003 21:10:32 +0100 by phpDocumentor 1.2.3