protected function _createFilter($filter, $config)
    {
        try {
            if (is_string($filter) && strpos($filter, '.') === false) {
                $filter = 'com:default.filter.'.trim($filter);
            }

            $filter = $this->getService($filter, $config);
        } catch (AnServiceServiceException $e) {
            throw new AnFilterException('Invalid filter: '.$filter);
        }

        //Check the filter interface
        if (!($filter instanceof AnFilterInterface)) {
            $identifier = $filter->getIdentifier();
            throw new AnFilterException("Filter $identifier does not implement AnFilterInterface");
        }

        return $filter;
    }