File tree Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Expand file tree Collapse file tree 2 files changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PHPModelGenerator \Filter ;
6
+
7
+ interface FilterInterface
8
+ {
9
+ /**
10
+ * Return a list of accepted data types for the filter (eg. ['string', 'int']). If the filter is applied to a
11
+ * value which doesn't match an accepted type an exception will be thrown. If an empty array is returned the filter
12
+ * will accept all types.
13
+ *
14
+ * @return array
15
+ */
16
+ public function getAcceptedTypes (): array ;
17
+
18
+ /**
19
+ * Return the token for the filter
20
+ *
21
+ * @return string
22
+ */
23
+ public function getToken (): string ;
24
+
25
+ /**
26
+ * Return the filter to apply. Make sure the returned array is a callable which is also callable after the
27
+ * render process
28
+ *
29
+ * @return array
30
+ */
31
+ public function getFilter (): array ;
32
+ }
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types = 1 );
4
+
5
+ namespace PHPModelGenerator \Filter ;
6
+
7
+ interface TransformingFilterInterface extends FilterInterface
8
+ {
9
+ /**
10
+ * Return the serializer to apply to transformed values.
11
+ * Make sure the returned array is a callable which is also callable after the render process
12
+ *
13
+ * @return array
14
+ */
15
+ public function getSerializer (): array ;
16
+ }
You can’t perform that action at this time.
0 commit comments