public function createFilter($filter, $config = array())
    {
        if(is_string($filter) && strpos($filter, '.') === false )
        {
            $identifier = $this->getIdentifier()->toArray();
            $identifier['name'] = $filter;
        }
        else $identifier = $filter;

        $filter = $this->getObject($identifier, $config);

        //Check the filter interface
        if(!($filter instanceof FilterInterface)) {
            throw new \UnexpectedValueException('Filter:'.get_class($filter).' does not implement FilterInterface');
        }

        return $filter;
    }