public function addCallback($callback, $driver = null)
	{
		if (!empty($driver)) {
			if (is_array($driver)) {
				if (!in_array($this->index->driver, $driver)) {
					return $this;
				}
			}
			else if ($driver != $this->index->driver) {
				return $this;
			}
		}
		
		$this->callbacks[] = $callback;
		
		return $this;
	}
public function addCallback($callback, $driver = null)
	{
		if (!empty($driver)) {
			if (is_array($driver)) {
				if (!in_array($this->index->driver, $driver)) {
					return $this;
				}
			}
			else if ($driver != $this->index->driver) {
				return $this;
			}
		}
		
		$this->callbacks[] = $callback;
		
		return $this;
	}
public function addCallback ( $ callback , $ driver = null ) { if ( ! empty ( $ driver ) ) { if ( is_array ( $ driver ) ) { if ( ! in_array ( $ this -> index -> driver , $ driver ) ) { return $ this ; } } else if ( $ driver != $ this -> index -> driver ) { return $ this ; } } $ this -> callbacks [ ] = $ callback ; return $ this ; }
Add a custom callback fn to be called just before the query is executed.

@param Closure      $callback
@param array|string $driver

@return \Mmanos\Search\Query
Add a custom callback fn to be called just before the query is executed .