Public Member Functions | |
getErrors () | |
getInnerErrors () | |
dropAllErrors () | |
enableImportFiltering () | |
disableImportFiltering () | |
getTextualErrors () | |
Returns plain list of error's labels. | |
getTextualErrorFor ($name) | |
getErrorDescriptionFor ($name) | |
addErrorDescription ($name, $errorType, $description) | |
addWrongLabel ($primitiveName, $label) | |
addMissingLabel ($primitiveName, $label) | |
addCustomLabel ($primitiveName, $customMark, $label) | |
getWrongLabel ($primitiveName) | |
getMissingLabel ($primitiveName) | |
import ($scope) | |
importMore ($scope) | |
importOne ($primitiveName, $scope) | |
importValue ($primitiveName, $value) | |
importOneMore ($primitiveName, $scope) | |
exportValue ($primitiveName) | |
export () | |
toFormValue ($value) | |
setProto (EntityProto $proto) | |
getProto () | |
markMissing ($primitiveName) | |
primitive marking | |
markWrong ($name) | |
rule or primitive | |
markGood ($primitiveName) | |
markCustom ($primitiveName, $customMark) | |
Set's custom error mark for primitive. | |
Static Public Member Functions | |
static | create () |
Public Attributes | |
const | WRONG = 0x0001 |
const | MISSING = 0x0002 |
Private Member Functions | |
importPrimitive ($scope, BasePrimitive $prm) | |
checkImportResult (BasePrimitive $prm, $result) | |
addErrorLabel ($name, $errorType, $label) | |
Assigns specific label for given primitive and error type. | |
getErrorLabel ($name, $errorType) | |
Private Attributes | |
$errors = array() | |
$labels = array() | |
$describedLabels = array() | |
$proto = null | |
$importFiltering = true |
Complete Form class.
Definition at line 20 of file Form.class.php.
Form::addCustomLabel | ( | $ | primitiveName, | |
$ | customMark, | |||
$ | label | |||
) |
Definition at line 256 of file Form.class.php.
References addErrorLabel().
Form::addErrorDescription | ( | $ | name, | |
$ | errorType, | |||
$ | description | |||
) |
Definition at line 221 of file Form.class.php.
Form::addErrorLabel | ( | $ | name, | |
$ | errorType, | |||
$ | label | |||
) | [private] |
Assigns specific label for given primitive and error type.
One more example of horrible documentation style.
$name | string primitive or rule name | |
$errorType | enum Form::(WRONG|MISSING) | |
$label | string YDFB WTF is this :-) (c) /. |
MissingElementException |
Definition at line 443 of file Form.class.php.
Referenced by addCustomLabel(), addMissingLabel(), and addWrongLabel().
Form::addMissingLabel | ( | $ | primitiveName, | |
$ | label | |||
) |
Definition at line 248 of file Form.class.php.
References addErrorLabel(), and MISSING.
Form::addWrongLabel | ( | $ | primitiveName, | |
$ | label | |||
) |
Definition at line 240 of file Form.class.php.
References addErrorLabel(), and WRONG.
Form::checkImportResult | ( | BasePrimitive $ | prm, | |
$ | result | |||
) | [private] |
Definition at line 406 of file Form.class.php.
References BasePrimitive::getCustomError(), BasePrimitive::getName(), BasePrimitive::isRequired(), and markGood().
Referenced by importPrimitive(), and importValue().
static Form::create | ( | ) | [static] |
Definition at line 36 of file Form.class.php.
Referenced by MethodMappedController::chooseAction(), FormBuilder::createEmpty(), EntityProto::makeForm(), AbstractProtoClass::makeForm(), and PrimitiveHstore::makeForm().
Form::disableImportFiltering | ( | ) |
Definition at line 93 of file Form.class.php.
Form::dropAllErrors | ( | ) |
Definition at line 72 of file Form.class.php.
Form::enableImportFiltering | ( | ) |
Definition at line 83 of file Form.class.php.
Form::export | ( | ) |
Definition at line 331 of file Form.class.php.
Form::exportValue | ( | $ | primitiveName | ) |
Definition at line 326 of file Form.class.php.
Form::getErrorDescriptionFor | ( | $ | name | ) |
Definition at line 198 of file Form.class.php.
Form::getErrorLabel | ( | $ | name, | |
$ | errorType | |||
) | [private] |
Definition at line 458 of file Form.class.php.
Referenced by getMissingLabel(), and getWrongLabel().
Form::getErrors | ( | ) |
Definition at line 41 of file Form.class.php.
Referenced by getInnerErrors(), SaveCommand::run(), and MakeCommand::run().
Form::getInnerErrors | ( | ) |
Definition at line 46 of file Form.class.php.
References $errors, and getErrors().
Form::getMissingLabel | ( | $ | primitiveName | ) |
Definition at line 266 of file Form.class.php.
References getErrorLabel(), and MISSING.
Form::getProto | ( | ) |
Definition at line 366 of file Form.class.php.
Form::getTextualErrorFor | ( | $ | name | ) |
Definition at line 178 of file Form.class.php.
Referenced by getTextualErrors().
Form::getTextualErrors | ( | ) |
Returns plain list of error's labels.
Definition at line 166 of file Form.class.php.
References getTextualErrorFor().
Form::getWrongLabel | ( | $ | primitiveName | ) |
Definition at line 261 of file Form.class.php.
References getErrorLabel(), and WRONG.
Form::import | ( | $ | scope | ) |
Definition at line 274 of file Form.class.php.
References importPrimitive().
Form::importMore | ( | $ | scope | ) |
Definition at line 285 of file Form.class.php.
References importPrimitive().
Form::importOne | ( | $ | primitiveName, | |
$ | scope | |||
) |
Definition at line 298 of file Form.class.php.
References importPrimitive().
Form::importOneMore | ( | $ | primitiveName, | |
$ | scope | |||
) |
Definition at line 316 of file Form.class.php.
References importPrimitive().
Form::importPrimitive | ( | $ | scope, | |
BasePrimitive $ | prm | |||
) | [private] |
Definition at line 374 of file Form.class.php.
References checkImportResult(), and BasePrimitive::import().
Referenced by import(), importMore(), importOne(), and importOneMore().
Form::importValue | ( | $ | primitiveName, | |
$ | value | |||
) |
Definition at line 306 of file Form.class.php.
References checkImportResult().
Referenced by AbstractProtoClass::importPrimitive(), and FormUtils::object2form().
Form::markCustom | ( | $ | primitiveName, | |
$ | customMark | |||
) |
Set's custom error mark for primitive.
Definition at line 153 of file Form.class.php.
References Assert::isInteger().
Referenced by markMissing().
Form::markGood | ( | $ | primitiveName | ) |
Definition at line 134 of file Form.class.php.
Referenced by checkImportResult(), and MakeCommand::run().
Form::markMissing | ( | $ | primitiveName | ) |
primitive marking
Definition at line 107 of file Form.class.php.
References markCustom(), and MISSING.
Referenced by DropCommand::run().
Form::markWrong | ( | $ | name | ) |
Form::setProto | ( | EntityProto $ | proto | ) |
Definition at line 356 of file Form.class.php.
Form::toFormValue | ( | $ | value | ) |
Definition at line 343 of file Form.class.php.
References PlainForm::getValue().
Referenced by PrefixUnaryExpression::toBoolean(), PostfixUnaryExpression::toBoolean(), LogicalBetween::toBoolean(), InExpression::toBoolean(), EqualsLowerExpression::toBoolean(), and BinaryExpression::toBoolean().
Form::$describedLabels = array() [private] |
Definition at line 27 of file Form.class.php.
Form::$errors = array() [private] |
Definition at line 25 of file Form.class.php.
Referenced by getInnerErrors().
Form::$importFiltering = true [private] |
Definition at line 31 of file Form.class.php.
Form::$labels = array() [private] |
Definition at line 26 of file Form.class.php.
Form::$proto = null [private] |
Definition at line 29 of file Form.class.php.
const Form::MISSING = 0x0002 |
Definition at line 23 of file Form.class.php.
Referenced by addMissingLabel(), getMissingLabel(), and markMissing().
const Form::WRONG = 0x0001 |
Definition at line 22 of file Form.class.php.
Referenced by addWrongLabel(), RegulatedForm::checkRules(), and getWrongLabel().