abstract class Tx_Extbase_DomainObject_AbstractDomainObject implements Tx_Extbase_DomainObject_DomainObjectInterface {
/**
- * @var string The uid
+ * @var int The uid
*/
protected $uid;
+ /**
+ * @var int The uid of the localization parent
+ */
+ protected $_localizationParentUid;
+
/**
* TRUE if the object is a clone
* @var boolean
*/
- private $isClone = FALSE;
+ private $_isClone = FALSE;
/**
* The generic constructor. If you want to implement your own __constructor() method in your Domain Object you have to call
* @return int the uid or NULL if none set yet.
*/
final public function getUid() {
- return ($this->uid === NULL ? NULL : (int)$this->uid);
+ if ($this->uid !== NULL) {
+ return (int)$this->uid;
+ } else {
+ return NULL;
+ }
}
-
+
/**
* Reconstitutes a property. Only for internal use.
*
*/
public function _getProperties() {
$properties = get_object_vars($this);
- unset($properties['_cleanProperties']);
+ foreach ($properties as $propertyName => $propertyValue) {
+ if ($propertyName{0} === '_') {
+ unset($properties[$propertyName]);
+ }
+ }
return $properties;
}
*/
public function _memorizeCleanState() {
}
-
- /**
- * Returns a hash map of dirty properties and $values. This is always the empty array for ValueObjects, because ValueObjects never change.
- *
- * @return array
- */
- public function _getDirtyProperties() {
- return array();
- }
-
+
/**
* Returns TRUE if the properties were modified after reconstitution. However, value objects can be never updated.
*
* @return boolean
*/
- public function _isDirty() {
+ public function _isDirty($propertyName = NULL) {
return FALSE;
}
* @return boolean TRUE if the object has been cloned
*/
public function _isClone() {
- return $this->isClone;
+ return $this->_isClone;
+ }
+
+ /**
+ * Setter whether this Domain Object is a clone of another one.
+ * NEVER SET THIS PROPERTY DIRECTLY. We currently need it to make the
+ * _isDirty check inside AbstractEntity work, but it is just a work-
+ * around right now.
+ *
+ * @param boolean $clone
+ */
+ public function _setClone($clone) {
+ $this->_isClone = (boolean)$clone;
}
/**
* @return void
*/
public function __clone() {
- $this->isClone = TRUE;
+ $this->_isClone = TRUE;
}
+
}
?>
\ No newline at end of file