DMS\Filter\Filters\Zend::apply PHP Method

apply() public method

{@inheritDoc}
public apply ( Rule $rule, $value )
$rule DMS\Filter\Rules\Rule
    public function apply(Rule $rule, $value)
    {
        return $this->getZendInstance($rule->class, $rule->zendOptions)->filter($value);
    }

Usage Example

Beispiel #1
0
 /**
  * @expectedException \DMS\Filter\Exception\InvalidZendFilterException
  */
 public function testInvalidFilter()
 {
     $rule = $this->buildRule('MissingFilter');
     $filter = new Zend();
     $filter->apply($rule, '0');
 }