DbObject: introduce onClone() hook

This commit is contained in:
Thomas Gelf 2015-08-02 13:42:49 +02:00
parent de843b19ed
commit bf596d98ee
1 changed files with 5 additions and 0 deletions

View File

@ -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();