From bf596d98ee8ace61a7c41e0f8a4673a596a59ac3 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sun, 2 Aug 2015 13:42:49 +0200 Subject: [PATCH] DbObject: introduce onClone() hook --- library/Director/Data/Db/DbObject.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/library/Director/Data/Db/DbObject.php b/library/Director/Data/Db/DbObject.php index 92cdfa39..4393c6cf 100644 --- a/library/Director/Data/Db/DbObject.php +++ b/library/Director/Data/Db/DbObject.php @@ -751,11 +751,16 @@ abstract class DbObject public function __clone() { + $this->onClone(); $this->autoincKeyName = null; $this->loadedFromDb = false; $this->hasBeenModified = true; } + protected function onClone() + { + } + public static function create($properties, DbConnection $connection = null) { $class = get_called_class();