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;
    }
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;
    }
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 ; }
Create a filter based on it's name

If the filter is not an identifier this function will create it directly
instead of going through the AnService identification process.

@param 	string	Filter identifier
@throws	AnFilterException	When the filter could not be found
@return  AnFilterInterface
Create a filter based on it s name