aboutsummaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorMikael Nordfeldth <mmn@hethane.se>2016-02-10 03:37:27 +0100
committerMikael Nordfeldth <mmn@hethane.se>2016-02-10 03:37:27 +0100
commit49b7648fea5226f2d3628028dd60088c3b35fe9d (patch)
treea073bba2e57223a3949a442df454ba2e28529c28 /classes
parentd0b2d86ca15bf7abc1d1e2ebac9a31c5c5aecf86 (diff)
downloadgnu-social-49b7648fea5226f2d3628028dd60088c3b35fe9d.tar
gnu-social-49b7648fea5226f2d3628028dd60088c3b35fe9d.zip
Managed_DataObject gets onInsert and onUpdate
Diffstat (limited to 'classes')
-rw-r--r--classes/Managed_DataObject.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/classes/Managed_DataObject.php b/classes/Managed_DataObject.php
index 28e7e1b658..31ae6614fb 100644
--- a/classes/Managed_DataObject.php
+++ b/classes/Managed_DataObject.php
@@ -515,4 +515,26 @@ abstract class Managed_DataObject extends Memcached_DataObject
$object->getID(),
common_date_iso8601($created));
}
+
+ protected function onInsert()
+ {
+ // NOOP by default
+ }
+
+ protected function onUpdate($dataObject=false)
+ {
+ // NOOP by default
+ }
+
+ public function insert()
+ {
+ $this->onInsert();
+ return parent::insert();
+ }
+
+ public function update($dataObject=false)
+ {
+ $this->onUpdate($dataObject);
+ return parent::update($dataObject);
+ }
}