| 1 | <?php |
||
| 17 | class Filter |
||
|
|
|||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | private $name; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * @var string |
||
| 26 | */ |
||
| 27 | private $type; |
||
| 28 | |||
| 29 | /** |
||
| 30 | * @var string |
||
| 31 | */ |
||
| 32 | private $label; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * @var string |
||
| 36 | */ |
||
| 37 | private $template; |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @var array |
||
| 41 | */ |
||
| 42 | private $options = []; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $name |
||
| 46 | * @param string $type |
||
| 47 | */ |
||
| 48 | private function __construct($name, $type) |
||
| 55 | |||
| 56 | /** |
||
| 57 | * @param string $name |
||
| 58 | * @param string $type |
||
| 59 | * |
||
| 60 | * @return self |
||
| 61 | */ |
||
| 62 | public static function fromNameAndType($name, $type) |
||
| 66 | |||
| 67 | /** |
||
| 68 | * @return string |
||
| 69 | */ |
||
| 70 | public function getName() |
||
| 74 | |||
| 75 | /** |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | public function getType() |
||
| 82 | |||
| 83 | /** |
||
| 84 | * @return string |
||
| 85 | */ |
||
| 86 | public function getLabel() |
||
| 90 | |||
| 91 | /** |
||
| 92 | * @param string $label |
||
| 93 | */ |
||
| 94 | public function setLabel($label) |
||
| 98 | |||
| 99 | /** |
||
| 100 | * @return string |
||
| 101 | */ |
||
| 102 | public function getTemplate() |
||
| 106 | |||
| 107 | /** |
||
| 108 | * @param string $template |
||
| 109 | */ |
||
| 110 | public function setTemplate($template) |
||
| 114 | |||
| 115 | /** |
||
| 116 | * @return array |
||
| 117 | */ |
||
| 118 | public function getOptions() |
||
| 122 | |||
| 123 | /** |
||
| 124 | * @param array $options |
||
| 125 | */ |
||
| 126 | public function setOptions($options) |
||
| 130 | } |
||
| 131 |