1 | <?php |
||
8 | class Filters |
||
9 | { |
||
10 | /** |
||
11 | * @var array |
||
12 | */ |
||
13 | static private $filters = []; |
||
14 | |||
15 | /** |
||
16 | * @var Annotations\FilterAnnotationHandler |
||
17 | */ |
||
18 | static private $annotation_handler = null; |
||
19 | |||
20 | /** |
||
21 | * Initialize the Annotation Handler for |
||
22 | * dealing with filter objects. |
||
23 | */ |
||
24 | 4 | public static function init() |
|
31 | |||
32 | /** |
||
33 | * @param $object |
||
34 | */ |
||
35 | 4 | public static function registerFilterObject($object) |
|
40 | |||
41 | /** |
||
42 | * @param string $tag |
||
43 | * @param string $callback |
||
44 | * @param int $priority |
||
45 | * @return bool |
||
46 | */ |
||
47 | 32 | public static function addFilter($tag = '', $callback = '', $priority = 10) |
|
61 | |||
62 | /** |
||
63 | * @param string $tag |
||
64 | * @param string $callback |
||
65 | * @return bool |
||
66 | */ |
||
67 | 12 | public static function removeFilter($tag = '', $callback = '') |
|
91 | |||
92 | /** |
||
93 | * @param string $tag |
||
94 | 24 | * @return bool |
|
95 | */ |
||
96 | 24 | public static function removeAllFilters($tag = '') |
|
111 | |||
112 | /** |
||
113 | * @param string $filter |
||
114 | 28 | * @param string $value |
|
115 | * @return string |
||
116 | 28 | */ |
|
117 | 4 | public static function applyFilter($filter = '', $value = '') |
|
129 | |||
130 | /** |
||
131 | 28 | * @param $tag |
|
132 | * @param string $value |
||
133 | 28 | * @return string |
|
134 | 4 | */ |
|
135 | private static function execute($tag, $value = '') |
||
154 | } |
||
155 |