public function setCallback($callback = null)
    {
        if (!is_null($callback) && !is_callable($callback)) {
            throw new Exception("callback must be of type callable or null");
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback($callback = null)
    {
        if (!is_null($callback) && !is_callable($callback)) {
            throw new Exception("callback must be of type callable or null");
        }

        $this->callback = $callback;

        return $this;
    }
public function setCallback ( $ callback = null ) { if ( ! is_null ( $ callback ) && ! is_callable ( $ callback ) ) { throw new Exception ( "callback must be of type callable or null" ) ; } $ this -> callback = $ callback ; return $ this ; }
Set callback function run for every entry before added to CSV.

Callable must take old column value as first parameter and return new (sanitized / filtered) column parameter.

@param callable $callback [optional]

@return $this
@throws Exception
Set callback function run for every entry before added to CSV .