/** * {@inheritdoc} */ public function asConfig() { if (!isset($this->vars['regexp'])) { throw new RuntimeException("Regexp filter is missing a 'regexp' value"); } return parent::asConfig(); }
/** * @testdox Sets the filter's signature to ['attrValue' => null] */ public function testDefaultSignature() { $filter = new AttributeFilter(function ($v) { }); $config = $filter->asConfig(); $this->assertSame(['attrValue' => null], $config['params']); }
public function asConfig() { if (!isset($this->vars['min'])) { throw new RuntimeException("Range filter is missing a 'min' value"); } if (!isset($this->vars['max'])) { throw new RuntimeException("Range filter is missing a 'max' value"); } return parent::asConfig(); }