# PlainForm Class Reference
[Data validation layer, Classes implemented in PHP's extension.]

Common Primitive-handling. More...

Inheritance diagram for PlainForm:
[legend]

List of all members.

## Public Member Functions

| clean ()
| exists ($name)
| primitiveExists ($name)
| add (BasePrimitive $prm)
| set (BasePrimitive $prm)
| drop ($name)
| get ($name)
| getValue ($name)
| setValue ($name, $value)
| getRawValue ($name)
| getActualValue ($name)
| getSafeValue ($name)
| getChoiceValue ($name)
| getActualChoiceValue ($name)
| getDisplayValue ($name)
| getPrimitiveNames ()
| getPrimitiveList ()

## Protected Attributes

| $primitives = array()

## Detailed Description

Common Primitive-handling.

Definition at line 18 of file PlainForm.class.php.

## Member Function Documentation

PlainForm::add | ( | BasePrimitive $ | prm | ) |

Exceptions:

  | WrongArgumentException |

Returns:
  Form

Definition at line 50 of file PlainForm.class.php.

References BasePrimitive::getName(), and Assert::isFalse().

Referenced by EntityProto::attachPrimitives(), and LightMetaProperty::fillForm().

Here is the call graph for this function:

PlainForm::clean | ( |  | ) |

Returns:
  Form

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

PlainForm::drop | ( | $ | name | ) |

Exceptions:

  | MissingElementException |

Returns:
  Form

Definition at line 78 of file PlainForm.class.php.

PlainForm::exists | ( | $ | name | ) |

Definition at line 33 of file PlainForm.class.php.

Referenced by primitiveExists().

PlainForm::get | ( | $ | name | ) |

Exceptions:

  | MissingElementException |

Returns:
  BasePrimitive

Definition at line 94 of file PlainForm.class.php.

Referenced by FormUtils::object2form().

PlainForm::getActualChoiceValue | ( | $ | name | ) |

Definition at line 136 of file PlainForm.class.php.

References Assert::isTrue().

Here is the call graph for this function:

PlainForm::getActualValue | ( | $ | name | ) |

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

PlainForm::getChoiceValue | ( | $ | name | ) |

Definition at line 129 of file PlainForm.class.php.

References Assert::isTrue().

Here is the call graph for this function:

PlainForm::getDisplayValue | ( | $ | name | ) |

Definition at line 143 of file PlainForm.class.php.

PlainForm::getPrimitiveList | ( |  | ) |

Definition at line 158 of file PlainForm.class.php.

Referenced by FormUtils::form2object(), FormToArgumentsConverter::getLong(), FormToArgumentsConverter::getShort(), and FormUtils::object2form().

PlainForm::getPrimitiveNames | ( |  | ) |

Definition at line 153 of file PlainForm.class.php.

PlainForm::getRawValue | ( | $ | name | ) |

Definition at line 114 of file PlainForm.class.php.

PlainForm::getSafeValue | ( | $ | name | ) |

Definition at line 124 of file PlainForm.class.php.

PlainForm::getValue | ( | $ | name | ) |

Definition at line 102 of file PlainForm.class.php.

Referenced by SaveCommand::run(), EditCommand::run(), DropCommand::run(), Form::toFormValue(), and FormField::toValue().

PlainForm::primitiveExists | ( | $ | name | ) |

Deprecated:
  , use exists()

Definition at line 41 of file PlainForm.class.php.

References exists().

Referenced by FormUtils::object2form().

Here is the call graph for this function:

PlainForm::set | ( | BasePrimitive $ | prm | ) |

Returns:
  Form

Definition at line 67 of file PlainForm.class.php.

PlainForm::setValue | ( | $ | name,
|  | $ | value |
| ) |  |  |

Definition at line 107 of file PlainForm.class.php.

## Member Data Documentation

PlainForm::$primitives = array()`[protected]`

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

The documentation for this class was generated from the following file:

- core/Form/PlainForm.class.php