File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
namespace Yaoi \Schema ;
4
4
5
- interface Constraint extends Transformer
5
+ interface Constraint
6
6
{
7
7
public function __construct ($ schemaValue , Schema $ ownerSchema = null );
8
+
8
9
public static function getSchemaKey ();
10
+
9
11
public function setOwnerSchema (Schema $ ownerSchema );
12
+
13
+
14
+ /**
15
+ * On import raw json data is available to validate against all of constraints.
16
+ * Constraint stores result in referenced variable (raw data value by default).
17
+ * Some constraints may alter result, e.g. `Properties` would create object and fill properties values.
18
+ *
19
+ * @param $data
20
+ * @param $result
21
+ * @return mixed
22
+ */
23
+ public function import ($ data , &$ result );
24
+
25
+ public function export ($ data );
26
+
10
27
}
You can’t perform that action at this time.
0 commit comments