# BasePrimitive Class Reference
[Base data types used in Form, Classes implemented in PHP's extension.]

Parent of every Primitive. More...

Inheritance diagram for BasePrimitive:
[legend]

List of all members.

## Public Member Functions

| __construct ($name)
| getName ()
| setName ($name)
| getDefault ()
| setDefault ($default)
| getValue ()
| getRawValue ()
| getActualValue ()
| getSafeValue ()
| setValue ($value)
| dropValue ()
| setRawValue ($raw)
| isRequired ()
| setRequired ($really=false)
| required ()
| optional ()
| isImported ()
| clean ()
| importValue ($value)
| exportValue ()
| getCustomError ()

## Protected Member Functions

| import ($scope)

## Protected Attributes

| $name = null
| $default = null
| $value = null
| $required = false
| $imported = false
| $raw = null
| $customError = null

## Detailed Description

Parent of every Primitive.

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

## Constructor & Destructor Documentation

BasePrimitive::__construct | ( | $ | name | ) |

Reimplemented in ComplexPrimitive, and FiltrablePrimitive.

Definition at line 31 of file BasePrimitive.class.php.

References $name.

## Member Function Documentation

BasePrimitive::clean | ( |  | ) |

Returns:
  BasePrimitive

Reimplemented in PrimitiveAlias, PrimitiveEnumerationList, PrimitiveFile, PrimitiveFormsList, PrimitiveIdentifierList, PrimitiveImage, and TimeList.

Definition at line 169 of file BasePrimitive.class.php.

Referenced by PrimitiveTernary::import(), and import().

BasePrimitive::dropValue | ( |  | ) |

Returns:
  BasePrimitive

Reimplemented in PrimitiveAlias.

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

BasePrimitive::exportValue | ( |  | ) |

Reimplemented in ComplexPrimitive, ExplodedPrimitive, IdentifiablePrimitive, PrimitiveAlias, PrimitiveDate, PrimitiveEnumerationList, PrimitiveFile, PrimitiveForm, PrimitiveFormsList, PrimitiveHstore, PrimitiveHttpUrl, PrimitiveIdentifierList, PrimitivePolymorphicIdentifier, and TimeList.

Definition at line 183 of file BasePrimitive.class.php.

BasePrimitive::getActualValue | ( |  | ) |

Reimplemented in PrimitiveAlias, and TimeList.

Definition at line 76 of file BasePrimitive.class.php.

Referenced by PrimitiveRange::getActualMax(), PrimitiveRange::getActualMin(), and FiltrablePrimitive::getDisplayValue().

BasePrimitive::getCustomError | ( |  | ) |

Reimplemented in PrimitiveAlias.

Definition at line 188 of file BasePrimitive.class.php.

Referenced by Form::checkImportResult().

BasePrimitive::getDefault | ( |  | ) |

Reimplemented in PrimitiveAlias.

Definition at line 51 of file BasePrimitive.class.php.

BasePrimitive::getName | ( |  | ) |

Reimplemented in PrimitiveAlias.

Definition at line 36 of file BasePrimitive.class.php.

Referenced by PlainForm::add(), Form::checkImportResult(), AbstractProtoClass::importPrimitive(), PrimitiveTime::importValue(), PrimitivePolymorphicIdentifier::importValue(), PrimitiveIdentifier::importValue(), PrimitiveHttpUrl::importValue(), PrimitiveEnumeration::importValue(), PrimitiveDate::importValue(), PrimitiveArray::importValue(), and importValue().

BasePrimitive::getRawValue | ( |  | ) |

Reimplemented in PrimitiveAlias.

Definition at line 71 of file BasePrimitive.class.php.

BasePrimitive::getSafeValue | ( |  | ) |

Reimplemented in PrimitiveAlias.

Definition at line 86 of file BasePrimitive.class.php.

BasePrimitive::getValue | ( |  | ) |

Reimplemented in PrimitiveAlias, and PrimitiveHstore.

Definition at line 66 of file BasePrimitive.class.php.

Referenced by AbstractProtoClass::exportPrimitive(), and PrimitiveFormsList::getInnerErrors().

BasePrimitive::import | ( | $ | scope | ) | `[protected]`

Reimplemented in ComplexPrimitive, ExplodedPrimitive, PrimitiveAlias, PrimitiveArray, PrimitiveBinary, PrimitiveBoolean, PrimitiveClass, PrimitiveDateRange, PrimitiveEnumeration, PrimitiveEnumerationByValue, PrimitiveEnumerationList, PrimitiveFile, PrimitiveForm, PrimitiveFormsList, PrimitiveHstore, PrimitiveHttpUrl, PrimitiveIdentifier, PrimitiveIdentifierList, PrimitiveImage, PrimitiveInet, PrimitiveNoValue, PrimitiveNumber, PrimitivePolymorphicIdentifier, PrimitiveString, PrimitiveTernary, PrimitiveTime, and TimeList.

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

References clean().

Referenced by PrimitiveString::import(), PrimitiveNumber::import(), PrimitiveMultiList::import(), PrimitiveInet::import(), PrimitiveIdentifierList::import(), PrimitiveFormsList::import(), PrimitiveFile::import(), PrimitiveEnumerationList::import(), PrimitiveBinary::import(), PrimitiveArray::import(), ComplexPrimitive::import(), PrimitiveTimestamp::importMarried(), PrimitiveTime::importMarried(), PrimitiveDate::importMarried(), Form::importPrimitive(), PrimitiveTime::importSingle(), PrimitiveRange::importSingle(), and PrimitiveDate::importSingle().

Here is the call graph for this function:

BasePrimitive::importValue | ( | $ | value | ) |

Reimplemented in PrimitiveAlias, PrimitiveArray, PrimitiveBoolean, PrimitiveDate, PrimitiveDateRange, PrimitiveEnumeration, PrimitiveEnumerationList, PrimitiveForm, PrimitiveFormsList, PrimitiveHstore, PrimitiveHttpUrl, PrimitiveIdentifier, PrimitiveIdentifierList, PrimitiveNoValue, PrimitivePolymorphicIdentifier, PrimitiveTernary, and PrimitiveTime.

Definition at line 178 of file BasePrimitive.class.php.

References $value, and getName().

Here is the call graph for this function:

BasePrimitive::isImported | ( |  | ) |

Reimplemented in PrimitiveAlias, and PrimitiveBoolean.

Definition at line 161 of file BasePrimitive.class.php.

Referenced by PrimitiveFormsList::exportValue().

BasePrimitive::isRequired | ( |  | ) |

Definition at line 126 of file BasePrimitive.class.php.

Referenced by Form::checkImportResult(), FormToArgumentsConverter::getValueType(), PrimitiveTimestamp::importMarried(), and PrimitiveDate::importMarried().

BasePrimitive::optional | ( |  | ) |

Returns:
  BasePrimitive

Definition at line 154 of file BasePrimitive.class.php.

References required().

Here is the call graph for this function:

BasePrimitive::required | ( |  | ) |

Returns:
  BasePrimitive

Definition at line 144 of file BasePrimitive.class.php.

Referenced by optional(), and setRequired().

BasePrimitive::setDefault | ( | $ | default | ) |

Returns:
  BasePrimitive

Reimplemented in PrimitiveAlias, PrimitiveDate, PrimitiveDateRange, and PrimitiveTime.

Definition at line 59 of file BasePrimitive.class.php.

References $default.

BasePrimitive::setName | ( | $ | name | ) |

Returns:
  BasePrimitive

Definition at line 44 of file BasePrimitive.class.php.

References $name.

BasePrimitive::setRawValue | ( | $ | raw | ) |

Returns:
  BasePrimitive

usually, you should not use this method

Reimplemented in PrimitiveAlias, and PrimitiveNoValue.

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

References $raw.

BasePrimitive::setRequired | ( | $ | really = `false` | ) |

Returns:
  BasePrimitive

Definition at line 134 of file BasePrimitive.class.php.

References required().

Here is the call graph for this function:

BasePrimitive::setValue | ( | $ | value | ) |

Returns:
  BasePrimitive

Reimplemented in IdentifiablePrimitive, PrimitiveAlias, PrimitiveDate, PrimitiveEnumerationList, PrimitiveForm, PrimitiveIdentifierList, PrimitiveNoValue, PrimitivePolymorphicIdentifier, PrimitiveRange, and PrimitiveTime.

Definition at line 97 of file BasePrimitive.class.php.

References $value.

## Member Data Documentation

BasePrimitive::$customError = null`[protected]`

Definition at line 29 of file BasePrimitive.class.php.

BasePrimitive::$default = null`[protected]`

Definition at line 21 of file BasePrimitive.class.php.

Referenced by PrimitiveMultiList::setDefault(), PrimitiveList::setDefault(), PrimitiveAlias::setDefault(), and setDefault().

BasePrimitive::$imported = false`[protected]`

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

BasePrimitive::$name = null`[protected]`

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

Referenced by PrimitiveAlias::__construct(), FiltrablePrimitive::__construct(), ComplexPrimitive::__construct(), __construct(), PrimitiveClass::classExists(), PrimitiveTimestampRange::create(), PrimitiveDateRange::create(), and setName().

BasePrimitive::$raw = null`[protected]`

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

Referenced by PrimitiveAlias::setRawValue(), and setRawValue().

BasePrimitive::$required = false`[protected]`

Definition at line 24 of file BasePrimitive.class.php.

BasePrimitive::$value = null`[protected]`

Reimplemented in PrimitiveEnumerationList, PrimitiveFormsList, PrimitiveIdentifierList, and TimeList.

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

Referenced by PrimitivePolymorphicIdentifier::export(), FiltrablePrimitive::getDisplayValue(), PrimitiveMultiList::import(), PrimitiveIdentifier::import(), PrimitiveEnumerationByValue::import(), PrimitiveTime::importValue(), PrimitiveTernary::importValue(), PrimitivePolymorphicIdentifier::importValue(), PrimitiveIdentifier::importValue(), PrimitiveHttpUrl::importValue(), PrimitiveHstore::importValue(), PrimitiveForm::importValue(), PrimitiveEnumeration::importValue(), PrimitiveDateRange::importValue(), PrimitiveDate::importValue(), PrimitiveBoolean::importValue(), PrimitiveArray::importValue(), PrimitiveAlias::importValue(), importValue(), FiltrablePrimitive::selfFilter(), PrimitivePolymorphicIdentifier::setValue(), PrimitiveForm::setValue(), PrimitiveAlias::setValue(), IdentifiablePrimitive::setValue(), and setValue().

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

- core/Form/Primitives/BasePrimitive.class.php