function createFilter($callbackOrFilterName, $options = null, $resursive = false)
    {
        if (is_callable($callbackOrFilterName)) {
            $filter = new Callback(array(
                'callback' => $callbackOrFilterName,
                'arguments' => $options
            ), $resursive);
        } elseif (is_string($callbackOrFilterName)) {
            if (class_exists('\Sirius\Filtration\Filter\\' . $callbackOrFilterName)) {
                $callbackOrFilterName = '\Sirius\Filtration\Filter\\' . $callbackOrFilterName;
            }
            // use the validator map
            if (isset($this->filtersMap[strtolower($callbackOrFilterName)])) {
                $callbackOrFilterName = $this->filtersMap[strtolower($callbackOrFilterName)];
            }
            if (class_exists($callbackOrFilterName) && is_subclass_of($callbackOrFilterName, '\Sirius\Filtration\Filter\AbstractFilter')) {
                $filter = new $callbackOrFilterName($options, $resursive);
            } else {
                throw new \InvalidArgumentException(sprintf('Impossible to determine the filter based on the name %s', (string) $callbackOrFilterName));
            }
        } elseif (is_object($callbackOrFilterName) && $callbackOrFilterName instanceof AbstractFilter) {
            $filter = $callbackOrFilterName;
        }
        if (! isset($filter)) {
            throw new \InvalidArgumentException('Invalid value for the $callbackorFilterName parameter');
        }
        return $filter;
    }