Delete object/s and reset ORM
@param $filter
@return bool
503561
public function erase($filter = null) {
		$filter = $this->queryParser->prepareFilter($filter, $this->dbsType, $this->db);
		if (!$filter) {
			if ($this->emit('beforeerase')===false)
				return false;
			if ($this->fieldConf) {
				// clear all m:m references
				foreach($this->fieldConf as $key => $conf)
					if (isset($conf['has-many']) &&
						$conf['has-many']['hasRel']=='has-many') {
						$rel = $this->getRelInstance(null, array(
							'db'=>$this->db,
							'table'=>$this->mmTable($conf['has-many'],$key)));
						$id = $this->get($conf['has-many']['relPK'],true);
						$rel->erase(array($conf['has-many']['relField'].' = ?', $id));
					}
			}
			$this->mapper->erase();
			$this->emit('aftererase');
		} elseif($filter)
			$this->mapper->erase($filter);
		return true;
	}
1101148
protected function isInstanceFilter($filter)
	{
		if (is_string($filter) && starts_with($filter, '@'))
		{
			if (method_exists($this, substr($filter, 1))) return true;

			throw new \InvalidArgumentException("Filter method [$filter] does not exist.");
		}

		return false;
	}
166646
public function delete($filter, array $options = [])
    {
        $this->ensureAllowedMethodCall(__METHOD__);

        if (isset($options['collation']) && !$this->server->supportsCollation()) {
            throw new UnsupportedException(
                'Option "collation" is not supported by the server.'
            );
        }

        if (null !== $this->listener) {
            $this->listener->beforeDelete($filter, $options);
        }

        $this->getWrappedBulk()->delete($filter, $options);
        $this->currentPosition += 1;
    }
279298
public static function deleteCustomers($filter = array())
    {
        $filter = Filter::create($filter);
        return self::deleteResource('/customers' . $filter->toQuery());
    }
807817
private static function cleanAndValidateFilter($token, $filter)
	{
		$filter_should_be_scalar = self::shouldBeScalar($token);

		// Format the filter, cutting off the trailing ']' if appropriate
		$filter = $filter_should_be_scalar ? explode(',', substr($filter, strlen($token))) :
			explode(',', substr($filter, strlen($token), -1));

		if ($filter_should_be_scalar) {
			if (count($filter) > 1) {
				return false;
			}

			// Set to first index if should be scalar
			$filter = $filter[0];
		}

		return $filter;
	}
1336107
public function removeFilter(FilterInterface $filter)
    {

        $this->filters = array_filter($this->filters, function (FilterInterface $f) use ($filter) {

            return $f !== $filter;
        });

        return $this;
    }
99567
protected function copy(Array $filter = array())
    {
        $filter = array_flip(array_merge($filter, $this->_readonlyAttr));

        $copy = new $this();
        $attributes = $this->selfToArray();
        foreach ($attributes as $key => &$value) {
            if (array_key_exists($key, $filter)) {
                unset($attributes[$key]);
            } elseif ($value instanceof ArrayObject) {
                try {
                    $newElements = $value->copy($filter);
                    $value = new $value;
                    foreach ($newElements as $elmCopy) {
                        $value->append($elmCopy);
                    }
                } catch (ArrayObject\UndefinedMethodException $e) {
                    // pass
                }
            } elseif ($value instanceof AbstractModel) {
                $value = $value->copy($filter);
            }
        }
        $copy->setData($attributes);
        return $copy;
    }
298987
function erase($filter=NULL,$quick=FALSE) {
		$db=$this->db;
		$now=microtime(TRUE);
		$data=&$db->read($this->file);
		$pkey=['_id'=>$this->id];
		if ($filter) {
			foreach ($this->find($filter,NULL,FALSE) as $mapper)
				if (!$mapper->erase(null,$quick))
					return FALSE;
			return TRUE;
		}
		elseif (isset($this->id)) {
			unset($data[$this->id]);
			parent::erase();
		}
		else
			return FALSE;
		if (!$quick && isset($this->trigger['beforeerase']) &&
			\Base::instance()->call($this->trigger['beforeerase'],
				[$this,$pkey])===FALSE)
			return FALSE;
		$db->write($this->file,$data);
		if ($filter) {
			$args=isset($filter[1]) && is_array($filter[1])?
				$filter[1]:
				array_slice($filter,1,NULL,TRUE);
			$args=is_array($args)?$args:[1=>$args];
			foreach ($args as $key=>$val) {
				$vals[]=\Base::instance()->
					stringify(is_array($val)?$val[0]:$val);
				$keys[]='/'.(is_numeric($key)?'\?':preg_quote($key)).'/';
			}
		}
		$db->jot('('.sprintf('%.1f',1e3*(microtime(TRUE)-$now)).'ms) '.
			$this->file.' [erase] '.
			($filter?preg_replace($keys,$vals,$filter[0],1):''));
		if (!$quick && isset($this->trigger['aftererase']))
			\Base::instance()->call($this->trigger['aftererase'],
				[$this,$pkey]);
		return TRUE;
	}
7144
public function deleteRows($table, $filters = null)
    {
        $query = $this->getDeleteQuery($table);

        //array('post_id=%s AND post_title IN %s', 123, array('asd'));
        if (is_array($filters)) {
            //can be array of arrays
            if (is_array($filters[0])) {
                foreach ($filters as $i => $filter) {
                    if (is_array($filters)) {
                        $format = array_shift($filter);

                        //reindex filters
                        $filter = array_values($filter);

                        //bind filters
                        foreach ($filter as $i => $value) {
                            $filter[$i] = $this->bind($value);
                        }

                        //combine
                        $query->where(vsprintf($format, $filter));
                    }
                }
            } else {
                $format = array_shift($filters);

                //reindex filters
                $filters = array_values($filters);

                //bind filters
                foreach ($filters as $i => $value) {
                    $filters[$i] = $this->bind($value);
                }

                //combine
                $query->where(vsprintf($format, $filters));
            }
        } else {
            $query->where($filters);
        }

        //run the query
        $this->query($query, $this->getBinds());

        return $this;
    }
858557
public function removeFilter(GridStateFilter $filter)
    {
        $filters = $this->getFilters();
        //usuwa filtr
        unset($filters[$filter->getTableName() . '.' . $filter->getField()]);
        return $this->setFilters($filters);
    }
26547
public function filter( $filter, $params )
    {
        $argList = func_get_args( );

        array_shift( $argList );

        if ( isset( $this->filters[ $filter ] ) )
        {
            foreach( $this->filters[ $filter ] as $callback )
            {
                $argList[ 0 ] = call_user_func_array( $callback[ 'callback' ], $argList );

                if ( $this->debug )
                {
                    echo PHP_EOL . '->FILTER: ' . $filter . ' -> '
                            . $this->_serializeCallback( $callback[ 'callback' ] )
                            . ' + Priority: ' . $callback[ 'priority' ]
                            . PHP_EOL;
                }
            }
        }

        return $argList[ 0 ];
    }
66693
public function installFilter($filter)
    {
        if (!is_callable($filter)) {
            $f = function () { return true; };
            $filter = $this->wrap($f, $filter);
        }

        $this->filter = $filter;

        return $this;
    }
39357
public function removeFilter($filter)
    {
        $key = is_callable($filter) ? 0 : 1;

        $this->filters = array_values(array_filter(
            $this->filters,
            function ($tuple) use ($key, $filter) {
                return $tuple[$key] !== $filter;
            }
        ));

        $this->updateInternalState();

        $this->handleChangedParameters();

        return $this;
    }
365006
public function getFilter($filter)
    {
        $result = null;

        if(isset($this->__filters[$filter])) {
            $result = $this->__filters[$filter];
         }

        return $result;
    }
697779
public function removeExtractor(\Closure $filter)
    {
        $filtered = array_filter($this->map, $filter);

        if (!$extractorToUnmap = current($filtered)) {
            return false;
        }

        $key = array_search($extractorToUnmap, $this->map);
        unset($this->map[$key]);

        return true;
    }
1030102
public function deleteOne(array $filter, array $options = [])
    {
        $this->writeModels[] = [BulkWrite::DELETE_ONE => [$filter, $options]];

        return $this;
    }
1109326
public function filter($filter)
    {
        if (is_array($filter) != true) {
            $filter = [$filter];
        }

        foreach ($filter as $item) {
            $this->filters[] = str_replace('./', $this->outpath . '/', $item);
        }

        return $this;
    }