From 65965b0943f2e599b0b4946315adab2917f258cc Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sun, 24 Jan 2010 18:57:04 +0100 Subject: [PATCH] DibiFluent: added support for cloning --- dibi/libs/DibiFluent.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dibi/libs/DibiFluent.php b/dibi/libs/DibiFluent.php index 3ad43d40..84e11d8f 100644 --- a/dibi/libs/DibiFluent.php +++ b/dibi/libs/DibiFluent.php @@ -453,6 +453,17 @@ class DibiFluent extends DibiObject implements IDataSource } + + + public function __clone() + { + // remove references + foreach ($this->clauses as $clause => $val) { + $this->clauses[$clause] = & $val; + } + $this->cursor = & $foo; + } + }