From b8600ee70424f0973f321c9ff164678efd67e752 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Sat, 23 Jan 2010 06:28:23 +0100 Subject: [PATCH] added DibiFluent::REMOVE const --- dibi/libs/DibiFluent.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dibi/libs/DibiFluent.php b/dibi/libs/DibiFluent.php index dfbcdc67..3ad43d40 100644 --- a/dibi/libs/DibiFluent.php +++ b/dibi/libs/DibiFluent.php @@ -20,6 +20,8 @@ */ class DibiFluent extends DibiObject implements IDataSource { + const REMOVE = FALSE; + /** @var array */ public static $masks = array( 'SELECT' => array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'GROUP BY', @@ -132,14 +134,14 @@ class DibiFluent extends DibiObject implements IDataSource $this->cursor = & $this->clauses[$clause]; // TODO: really delete? - if ($args === array(FALSE)) { + if ($args === array(self::REMOVE)) { $this->cursor = NULL; return $this; } if (isset(self::$separators[$clause])) { $sep = self::$separators[$clause]; - if ($sep === FALSE) { + if ($sep === FALSE) { // means: replace $this->cursor = array(); } elseif (!empty($this->cursor)) { @@ -149,7 +151,7 @@ class DibiFluent extends DibiObject implements IDataSource } else { // append to currect flow - if ($args === array(FALSE)) { + if ($args === array(self::REMOVE)) { return $this; }