protected function validateFilter($filter)
    {
        if (!isset($this->filterOptions->getFilters()[$filter])) {
            throw new Exception\FilterNotFoundException(sprintf(
                'Filter "%s" was not found', $filter
            ));
        }
        $options = $this->filterOptions->getFilters()[$filter];
        if (!isset($options['type'])) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Filter type for "%s" image filter must be specified', $filter
            ));
        }
        if (!isset($options['options'])) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Options for filter type "%s" must be specified', $filter
            ));
        }
    }
protected function validateFilter($filter)
    {
        if (!isset($this->filterOptions->getFilters()[$filter])) {
            throw new Exception\FilterNotFoundException(sprintf(
                'Filter "%s" was not found', $filter
            ));
        }
        $options = $this->filterOptions->getFilters()[$filter];
        if (!isset($options['type'])) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Filter type for "%s" image filter must be specified', $filter
            ));
        }
        if (!isset($options['options'])) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Options for filter type "%s" must be specified', $filter
            ));
        }
    }
protected function validateFilter ( $ filter ) { if ( ! isset ( $ this -> filterOptions -> getFilters ( ) [ $ filter ] ) ) { throw new Exception \ FilterNotFoundException ( sprintf ( 'Filter "%s" was not found' , $ filter ) ) ; } $ options = $ this -> filterOptions -> getFilters ( ) [ $ filter ] ; if ( ! isset ( $ options [ 'type' ] ) ) { throw new Exception \ InvalidArgumentException ( sprintf ( 'Filter type for "%s" image filter must be specified' , $ filter ) ) ; } if ( ! isset ( $ options [ 'options' ] ) ) { throw new Exception \ InvalidArgumentException ( sprintf ( 'Options for filter type "%s" must be specified' , $ filter ) ) ; } }
Validates if filter exists and is valid

@param  string                             $filter Filter Service
@throws Exception\FilterNotFoundException
@throws Exception\InvalidArgumentException
@return void
Validates if filter exists and is valid