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

Class: Bs_FormIniHandler

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

Class Overview

Bs_Object
   |
   --Bs_FormIniHandler

Form Ini Handler Class


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 35]
Form Ini Handler Class

WARNING: the group names and field names in the ini file may not have spaces, underscores or other special chars. this class would not work.

 example usage:
 require_once($APP['path']['core'] . 'html/form/Bs_FormIniHandler.class.php');
 $ini =& new Bs_FormIniHandler();
 $ini->doItYourselfWithPage('/somewhere/something.ini');
 

dependencies: Bs_Form, Bs_IniHandler




Tags:

since:  bs4.3
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

$acceptEmpty =  TRUE

[line 65]



Tags:

access:  public

Type:   bool


[ Top ]

$globalGroupName =  '_globalGroup_'

[line 75]

ini settings that are in the 'global scope' (not in a [category]) need a pseudo string for the form handling. you should never need to change this string. it works like a constant.



Tags:

access:  public

Type:   string


[ Top ]

$mayAddFields =  FALSE

[line 59]



Tags:

access:  public

Type:   bool


[ Top ]



Class Methods


constructor Bs_FormIniHandler [line 81]

Bs_FormIniHandler Bs_FormIniHandler( )

Constructor.



[ Top ]

method createFormObj [line 116]

void createFormObj( )

creates a form instance. this method is called itself if needed.



Tags:

see:  $this->setFormObj()


[ Top ]

method doItYourself [line 138]

mixed doItYourself( string $fileFullPath)

does everything itself. includes storing the new values.



Tags:

return:  (array the return of Bs_Form->getAll(), or bool TRUE after a successful form submit.)
see:  $this->doItYourselfWithPage()
throws:  bool FALSE if file does not exist or not readable.
access:  public


Parameters:

string   $fileFullPath  

[ Top ]

method doItYourselfWithPage [line 172]

string doItYourselfWithPage( string $fileFullPath)

does everything itself, including building the whole html page.

great if you're on the fast track.




Tags:

return:  (html output, whatever it is. includes error message in the body.)
see:  $this->doItYourself()
access:  public


Parameters:

string   $fileFullPath  

[ Top ]

method generateFormFieldsByFullPath [line 220]

bool generateFormFieldsByFullPath( string $fileFullPath)

generates the containers and form fields, and adds them to the form object that is in use.



Tags:

access:  public


Parameters:

string   $fileFullPath  

[ Top ]

method getFormObj [line 105]

& &getFormObj( )

returns the form instance by reference.



Tags:

return:  form instance
access:  public


[ Top ]

method setFormObj [line 95]

void setFormObj( object &$form)

sets the given form object. takes it by reference.

if you don't use this method at all then this class will create its own form instance.




Tags:

access:  public


Parameters:

object   &$form  

[ Top ]


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