mirror of
https://github.com/dg/dibi.git
synced 2025-08-06 06:07:39 +02:00
DibiFluent: added removeClause()
This commit is contained in:
@@ -175,7 +175,8 @@ class DibiFluent extends DibiObject implements IDataSource
|
|||||||
{
|
{
|
||||||
$this->cursor = & $this->clauses[self::_formatClause($clause)];
|
$this->cursor = & $this->clauses[self::_formatClause($clause)];
|
||||||
|
|
||||||
if ($remove) {
|
if ($remove) { // deprecated, use removeClause
|
||||||
|
trigger_error(__METHOD__ . '(..., TRUE) is deprecated; use removeClause() instead.', E_USER_NOTICE);
|
||||||
$this->cursor = NULL;
|
$this->cursor = NULL;
|
||||||
|
|
||||||
} elseif ($this->cursor === NULL) {
|
} elseif ($this->cursor === NULL) {
|
||||||
@@ -187,6 +188,19 @@ class DibiFluent extends DibiObject implements IDataSource
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Removes a clause.
|
||||||
|
* @param string clause name
|
||||||
|
* @return DibiFluent provides a fluent interface
|
||||||
|
*/
|
||||||
|
public function removeClause($clause)
|
||||||
|
{
|
||||||
|
$this->clauses[self::_formatClause($clause)] = NULL;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Change a SQL flag.
|
* Change a SQL flag.
|
||||||
* @param string flag name
|
* @param string flag name
|
||||||
|
Reference in New Issue
Block a user