Form Class Reference
[Data validation layer]

Complete Form class. More...

Inheritance diagram for Form:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 getErrors ()
 dropAllErrors ()
 
Returns:
Form

 getTextualErrors ()
 Returns plain list of error's labels.
 getTextualErrorFor ($name)
 getErrorDescriptionFor ($name)
 addErrorDescription ($name, $errorType, $description)
 
Returns:
Form

 addWrongLabel ($primitiveName, $label)
 
Returns:
Form

 addMissingLabel ($primitiveName, $label)
 
Returns:
Form

 addCustomLabel ($primitiveName, $customMark, $label)
 
Returns:
Form

 import ($scope)
 
Returns:
Form

 importMore ($scope)
 
Returns:
Form

 importOne ($primitiveName, $scope)
 
Returns:
Form

 importValue ($primitiveName, $value)
 
Returns:
Form

 importOneMore ($primitiveName, $scope)
 
Returns:
Form

 toFormValue ($value)
 markMissing ($primitiveName)
 primitive marking
 markWrong ($name)
 rule or primitive
 markGood ($primitiveName)
 
Returns:
Form

 markCustom ($primitiveName, $customMark)
 Set's custom error mark for primitive.

Static Public Member Functions

static create ()
 
Returns:
Form


Public Attributes

const WRONG = 0x0001
const MISSING = 0x0002

Private Member Functions

 importPrimitive ($scope, BasePrimitive $prm)
 
Returns:
Form

 checkImportResult (BasePrimitive $prm, $result)
 
Returns:
Form

 addErrorLabel ($name, $errorType, $label)
 Assigns specific label for given primitive and error type.

Private Attributes

 $errors = array()
 $labels = array()
 $describedLabels = array()


Detailed Description

Complete Form class.

See also:
http://onphp.org/examples.Form.en.html

Definition at line 20 of file Form.class.php.


Member Function Documentation

static Form::create (  )  [static]

Returns:
Form

Definition at line 32 of file Form.class.php.

Referenced by FormedController::__construct(), and MethodMappedController::chooseAction().

Form::getErrors (  ) 

Definition at line 37 of file Form.class.php.

Form::dropAllErrors (  ) 

Returns:
Form

Definition at line 45 of file Form.class.php.

Form::markMissing ( primitiveName  ) 

primitive marking

Returns:
Form

Definition at line 60 of file Form.class.php.

References markCustom(), and MISSING.

Referenced by DropCommand::run().

Here is the call graph for this function:

Form::markWrong ( name  ) 

rule or primitive

Returns:
Form

Definition at line 70 of file Form.class.php.

Form::markGood ( primitiveName  ) 

Returns:
Form

Definition at line 87 of file Form.class.php.

Referenced by MakeCommand::run().

Form::markCustom ( primitiveName,
customMark 
)

Set's custom error mark for primitive.

Returns:
Form

Definition at line 106 of file Form.class.php.

Referenced by markMissing().

Form::getTextualErrors (  ) 

Returns plain list of error's labels.

Definition at line 119 of file Form.class.php.

References getTextualErrorFor().

Here is the call graph for this function:

Form::getTextualErrorFor ( name  ) 

Definition at line 131 of file Form.class.php.

Referenced by getTextualErrors().

Form::getErrorDescriptionFor ( name  ) 

Definition at line 151 of file Form.class.php.

Form::addErrorDescription ( name,
errorType,
description 
)

Returns:
Form

Definition at line 174 of file Form.class.php.

Form::addWrongLabel ( primitiveName,
label 
)

Returns:
Form

Definition at line 193 of file Form.class.php.

References addErrorLabel(), and WRONG.

Here is the call graph for this function:

Form::addMissingLabel ( primitiveName,
label 
)

Returns:
Form

Definition at line 201 of file Form.class.php.

References addErrorLabel(), and MISSING.

Here is the call graph for this function:

Form::addCustomLabel ( primitiveName,
customMark,
label 
)

Returns:
Form

Definition at line 209 of file Form.class.php.

References addErrorLabel().

Here is the call graph for this function:

Form::import ( scope  ) 

Returns:
Form

Definition at line 217 of file Form.class.php.

References importPrimitive().

Here is the call graph for this function:

Form::importMore ( scope  ) 

Returns:
Form

Definition at line 228 of file Form.class.php.

References importPrimitive().

Here is the call graph for this function:

Form::importOne ( primitiveName,
scope 
)

Returns:
Form

Definition at line 241 of file Form.class.php.

References importPrimitive().

Here is the call graph for this function:

Form::importValue ( primitiveName,
value 
)

Returns:
Form

Definition at line 249 of file Form.class.php.

References checkImportResult().

Referenced by importPrimitive(), and FormUtils::object2form().

Here is the call graph for this function:

Form::importOneMore ( primitiveName,
scope 
)

Returns:
Form

Definition at line 259 of file Form.class.php.

References importPrimitive().

Here is the call graph for this function:

Form::toFormValue ( value  ) 

Definition at line 269 of file Form.class.php.

References PlainForm::getValue().

Referenced by PrefixUnaryExpression::toBoolean(), PostfixUnaryExpression::toBoolean(), LogicalBetween::toBoolean(), InExpression::toBoolean(), EqualsLowerExpression::toBoolean(), and BinaryExpression::toBoolean().

Here is the call graph for this function:

Form::importPrimitive ( scope,
BasePrimitive prm 
) [private]

Returns:
Form

Definition at line 282 of file Form.class.php.

References checkImportResult(), and importValue().

Referenced by import(), importMore(), importOne(), and importOneMore().

Here is the call graph for this function:

Form::checkImportResult ( BasePrimitive prm,
result 
) [private]

Returns:
Form

Definition at line 300 of file Form.class.php.

References BasePrimitive::getName().

Referenced by importPrimitive(), and importValue().

Here is the call graph for this function:

Form::addErrorLabel ( name,
errorType,
label 
) [private]

Assigns specific label for given primitive and error type.

One more example of horrible documentation style.

Parameters:
$name string primitive or rule name
$errorType enum Form::(WRONG|MISSING)
$label string YDFB WTF is this :-) (c) /.
Exceptions:
MissingElementException 
Returns:
Form

Definition at line 325 of file Form.class.php.

Referenced by addCustomLabel(), addMissingLabel(), and addWrongLabel().


Member Data Documentation

const Form::WRONG = 0x0001

Definition at line 22 of file Form.class.php.

Referenced by addWrongLabel(), and RegulatedForm::checkRules().

const Form::MISSING = 0x0002

Definition at line 23 of file Form.class.php.

Referenced by addMissingLabel(), and markMissing().

Form::$errors = array() [private]

Definition at line 25 of file Form.class.php.

Form::$labels = array() [private]

Definition at line 26 of file Form.class.php.

Form::$describedLabels = array() [private]

Definition at line 27 of file Form.class.php.


The documentation for this class was generated from the following file:
Generated on Sun Dec 9 21:57:26 2007 for onPHP by  doxygen 1.5.4