* A abstract Value Object. A Value Object is an object that describes some characteristic
* or attribute (e.g. a color) but carries no concept of identity.
*
- * @package TYPO3
- * @subpackage extbase
+ * @package Extbase
+ * @subpackage DomainObject
* @version $ID:$
*/
-abstract class Tx_ExtBase_DomainObject_AbstractValueObject extends Tx_ExtBase_DomainObject_AbstractDomainObject {
+abstract class Tx_Extbase_DomainObject_AbstractValueObject extends Tx_Extbase_DomainObject_AbstractDomainObject {
/**
- * Register an object's clean state, e.g. after it has been reconstituted
- * from the database
+ * Returns the value of the Value Object. Must be overwritten by a concrete value object.
*
* @return void
- * @internal
*/
- public function _memorizeCleanState() {
+ public function getValue() {
+ return $this->__toString();
}
-
+
/**
- * Returns a hash map of dirty properties and $values. This is always the empty array for ValueObjects, because ValueObjects never change.
+ * Clone method. Sets the _isClone property.
*
- * @return array
- * @internal
+ * @return void
*/
- public function _getDirtyProperties() {
- return array();
+ public function __clone() {
+ $this->isClone = TRUE;
+ $this->uid = NULL;
}
- /**
- * Returns TRUE if the properties were modified after reconstitution. However, value objects can be never updated.
- *
- * @return boolean
- * @internal
- */
- public function _isDirty() {
- return FALSE;
- }
}
?>
\ No newline at end of file