| applications_contactform

# Class: Bs_ContactForm Source Location: /applications/contactform/Bs_ContactForm.class.php
### Class Overview
    Bs_Object
       |
       --Bs_MagicClass
          |
          --Bs_ContactForm
Contact Form Class. #### Author(s): andrej arn <at blueshoes dot org> #### Version: 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:22:34 $ #### Copyright: blueshoes.org | ### Variables $addDatetime $Bs_Array $comments $email $firstname $gender $lastname $_language | ### Methods Bs_ContactForm doItYourself emailExternal emailInternal getFormObj getSubmittedDataAsEmailString loadFormHints setLanguage setSaveByDb setSaveByDsn setSaveByPersister store
### Inherited Variables #### Class: Bs_MagicClass Bs_MagicClass::$formFields Bs_MagicClass::$formFieldsUsed Bs_MagicClass::$formGroups Bs_MagicClass::$formProps Bs_MagicClass::$persistFields Bs_MagicClass::$persistFieldsUsed Bs_MagicClass::$persistPrimary Bs_MagicClass::$uniqueKey | ### Inherited Methods #### Class: Bs_MagicClass Bs_MagicClass::Bs_MagicClass() constructor Bs_MagicClass::activateField() activates a predefined field that is not activated by default. Bs_MagicClass::addField() adds (and activates) the given field. Bs_MagicClass::bs_fia_getHints() Bs_MagicClass::bs_sop_getHints() Bs_MagicClass::loadFormHints() Bs_MagicClass::loadPersistHints() Bs_MagicClass::removeField() deactivates an active field. #### 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 29] Contact Form Class. dependencies: Bs_Array, Bs_FormItAble, Bs_SimpleObjPersister #### Tags:
since: | bs4.3
copyright: | blueshoes.org
pattern: | singleton: (pseudostatic)
access: | public
version: | 4.3.$Revision: 1.2 $ $Date: 2003/08/09 15:22:34 $
author: | andrej arn <at blueshoes dot org>
[ Top ] ### Class Variables #### $addDatetime = [line 76]
Type: | mixed
[ Top ] #### $Bs_Array = [line 38] reference to the global pseudostatic object. gets set automatically in the constructor. #### Tags:
access: | public
Type: | object
[ Top ] #### $comments = [line 75]
Type: | mixed
[ Top ] #### $email = [line 74]
Type: | mixed
[ Top ] #### $firstname = [line 72]
Type: | mixed
[ Top ] #### $gender = [line 71]
Type: | mixed
[ Top ] #### $lastname = [line 73]
Type: | mixed
[ Top ] #### $_language = [line 68] #### Tags:
see: | $this->setLanguage()
Type: | mixed
[ Top ] ### Class Methods ### constructor Bs_ContactForm [line 83]
`Bs_ContactForm Bs_ContactForm( [bool $loadFormHints = TRUE])`
constructor #### Parameters:
bool | $loadFormHints | (default is TRUE)
[ Top ] ### method doItYourself [line 172]
`mixed doItYourself( )`
does the form handling. you do not need to call this method, you can do it all by hand in your own code. note: no matter if the form needs to be displayed or if it has been submitted successfully, after calling this method the object var $this->_formObj will be set and thus $this->getFormObj() will work. returned value: if the form has to be displayed: array from Bs_Form->getAll(). otherwise (after a successful submit): bool TRUE. #### Tags:
return: | (hash or bool TRUE, see above.)
see: | $this->getFormObj()
access: | public
[ Top ] ### method emailExternal [line 241]
`bool emailExternal( string $email)`
sends out an email with the submitted information. this can be used to send a confirmation message to the submitter/client. #### Tags:
access: | public
#### Parameters:
string | $email | (email address)
[ Top ] ### method emailInternal [line 218]
`bool emailInternal( string $email)`
sends out an email with the submitted and internal information. only call this after doItYourself() has been called. #### Tags:
access: | public
#### Parameters:
string | $email | (email address)
[ Top ] ### method getFormObj [line 193]
`&object &getFormObj( )`
returns a reference to the form object that is in use. only possible after a call to $this->doItYourself(). #### Tags:
see: | $this->doItYourself(), var $this->_formObj
throws: | bool FALSE (if object not set)
access: | public
[ Top ] ### method getSubmittedDataAsEmailString [line 256]
`string getSubmittedDataAsEmailString( )`
returns the user-submitted data as one string that can be used to send along with other text in an email. #### Tags:
throws: | bool FALSE
access: | public
[ Top ] ### method loadFormHints [line 306]
`void loadFormHints( )`
#### Tags:
access: | public
Overrides Bs_MagicClass::loadFormHints() (parent method not documented) [ Top ] ### method setLanguage [line 96]
`void setLanguage( string $language)`
sets the language that will be used. currently supported are: en (default) and de. #### Tags:
access: | public
#### Parameters:
string | $language |
[ Top ] ### method setSaveByDb [line 132]
`bool setSaveByDb( string $tableName, object &$bsDb)`
activates the auto-persisting feature by passing a db agent. #### Tags:
see: | $this->setSaveByDsn(), $this->setSaveByPersister()
access: | public
#### Parameters:
string | $tableName |
object | &$bsDb |
[ Top ] ### method setSaveByDsn [line 112]
`bool setSaveByDsn( string $tableName, array $dsn)`
activates the auto-persisting feature by specifying a dsn. #### Tags:
see: | $this->setSaveByDb(), $this->setSaveByPersister()
access: | public
#### Parameters:
string | $tableName |
array | $dsn |
[ Top ] ### method setSaveByPersister [line 148]
`bool setSaveByPersister( string $tableName, array &$objP)`
activates the auto-persisting feature by passing an object persister. #### Tags:
see: | $this->setSaveByDsn(), $this->setSaveByDb()
access: | public
#### Parameters:
string | $tableName |
array | &$objP |
[ Top ] ### method store [line 204]
`bool store( )`
stores the submitted data. #### Tags:
return: | TRUE on success; FALSE on error (see getLastError()).
access: | public
[ Top ] Documentation generated on Mon, 29 Dec 2003 21:08:18 +0100 by phpDocumentor 1.2.3