public function registerFilter($filterName)
    {
        $className = __CLASS__ . '\\Filter\\' . ucfirst($filterName);
        try {
            $filterInstance = $this->getClassInstance($className);
            if (!$filterInstance instanceof VoltFilterAbstract) {
                throw new InvalidFilterException();
            }
            $this->getCompiler()->addFilter($filterName, $filterInstance->getFilter());
        } catch (\ReflectionException $e) {
            throw new UnknownFilterException(sprintf('Filter \'%s\' does not exist', $filterName));
        } catch (\Exception $e) {
            throw new InvalidFilterException(sprintf('Invalid filter \'%s\'', $filterName));
        }
    }
public function registerFilter($filterName)
    {
        $className = __CLASS__ . '\\Filter\\' . ucfirst($filterName);
        try {
            $filterInstance = $this->getClassInstance($className);
            if (!$filterInstance instanceof VoltFilterAbstract) {
                throw new InvalidFilterException();
            }
            $this->getCompiler()->addFilter($filterName, $filterInstance->getFilter());
        } catch (\ReflectionException $e) {
            throw new UnknownFilterException(sprintf('Filter \'%s\' does not exist', $filterName));
        } catch (\Exception $e) {
            throw new InvalidFilterException(sprintf('Invalid filter \'%s\'', $filterName));
        }
    }
public function registerFilter ( $ filterName ) { $ className = __CLASS__ . '\\Filter\\' . ucfirst ( $ filterName ) ; try { $ filterInstance = $ this -> getClassInstance ( $ className ) ; if ( ! $ filterInstance instanceof VoltFilterAbstract ) { throw new InvalidFilterException ( ) ; } $ this -> getCompiler ( ) -> addFilter ( $ filterName , $ filterInstance -> getFilter ( ) ) ; } catch ( \ ReflectionException $ e ) { throw new UnknownFilterException ( sprintf ( 'Filter \'%s\' does not exist' , $ filterName ) ) ; } catch ( \ Exception $ e ) { throw new InvalidFilterException ( sprintf ( 'Invalid filter \'%s\'' , $ filterName ) ) ; } }
Registers a new filter in the compiler

@param $filterName
@throws InvalidFilterException
@throws UnknownFilterException
Registers a new filter in the compiler