mirror of
https://github.com/dg/dibi.git
synced 2025-08-05 05:37:39 +02:00
added DibiFluent::REMOVE const
This commit is contained in:
@@ -20,6 +20,8 @@
|
|||||||
*/
|
*/
|
||||||
class DibiFluent extends DibiObject implements IDataSource
|
class DibiFluent extends DibiObject implements IDataSource
|
||||||
{
|
{
|
||||||
|
const REMOVE = FALSE;
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
public static $masks = array(
|
public static $masks = array(
|
||||||
'SELECT' => array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'GROUP BY',
|
'SELECT' => array('SELECT', 'DISTINCT', 'FROM', 'WHERE', 'GROUP BY',
|
||||||
@@ -132,14 +134,14 @@ class DibiFluent extends DibiObject implements IDataSource
|
|||||||
$this->cursor = & $this->clauses[$clause];
|
$this->cursor = & $this->clauses[$clause];
|
||||||
|
|
||||||
// TODO: really delete?
|
// TODO: really delete?
|
||||||
if ($args === array(FALSE)) {
|
if ($args === array(self::REMOVE)) {
|
||||||
$this->cursor = NULL;
|
$this->cursor = NULL;
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset(self::$separators[$clause])) {
|
if (isset(self::$separators[$clause])) {
|
||||||
$sep = self::$separators[$clause];
|
$sep = self::$separators[$clause];
|
||||||
if ($sep === FALSE) {
|
if ($sep === FALSE) { // means: replace
|
||||||
$this->cursor = array();
|
$this->cursor = array();
|
||||||
|
|
||||||
} elseif (!empty($this->cursor)) {
|
} elseif (!empty($this->cursor)) {
|
||||||
@@ -149,7 +151,7 @@ class DibiFluent extends DibiObject implements IDataSource
|
|||||||
|
|
||||||
} else {
|
} else {
|
||||||
// append to currect flow
|
// append to currect flow
|
||||||
if ($args === array(FALSE)) {
|
if ($args === array(self::REMOVE)) {
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user