Skip to content

Commit 986087b

Browse files
committed
broken arms
1 parent 9fe38ec commit 986087b

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

src/Constraint.php

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,26 @@
22

33
namespace Yaoi\Schema;
44

5-
interface Constraint extends Transformer
5+
interface Constraint
66
{
77
public function __construct($schemaValue, Schema $ownerSchema = null);
8+
89
public static function getSchemaKey();
10+
911
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+
1027
}

0 commit comments

Comments
 (0)