| 1 | <?php |
||
| 22 | class NotFilter implements BuilderInterface |
||
| 23 | { |
||
| 24 | use ParametersTrait; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @var BuilderInterface |
||
| 28 | */ |
||
| 29 | private $filter; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * @param BuilderInterface $filter Filter. |
||
| 33 | * @param array $parameters Optional parameters. |
||
| 34 | */ |
||
| 35 | public function __construct(BuilderInterface $filter = null, array $parameters = []) |
||
| 36 | { |
||
| 37 | if ($filter !== null) { |
||
| 38 | $this->setFilter($filter); |
||
| 39 | } |
||
| 40 | $this->setParameters($parameters); |
||
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Returns filter. |
||
| 45 | * |
||
| 46 | * @return BuilderInterface |
||
| 47 | */ |
||
| 48 | public function getFilter() |
||
| 52 | |||
| 53 | /** |
||
| 54 | * Sets filter. |
||
| 55 | * |
||
| 56 | * @param BuilderInterface $filter |
||
| 57 | */ |
||
| 58 | public function setFilter(BuilderInterface $filter) |
||
| 62 | |||
| 63 | /** |
||
| 64 | * {@inheritdoc} |
||
| 65 | */ |
||
| 66 | public function getType() |
||
| 67 | { |
||
| 68 | return 'not'; |
||
| 69 | } |
||
| 70 | |||
| 71 | /** |
||
| 72 | * {@inheritdoc} |
||
| 73 | */ |
||
| 74 | public function toArray() |
||
| 83 | } |
||
| 84 |