1 | <?php |
||
12 | trait ClassStructureTrait |
||
13 | { |
||
14 | use ObjectItemTrait; |
||
15 | |||
16 | /** |
||
17 | * @return ClassSchema |
||
18 | */ |
||
19 | public static function schema() |
||
35 | |||
36 | /** |
||
37 | * @return Properties|static |
||
38 | */ |
||
39 | public static function properties() |
||
43 | |||
44 | /** |
||
45 | * @param mixed $data |
||
46 | * @param Context $options |
||
47 | * @return static |
||
48 | */ |
||
49 | public static function import($data, Context $options = null) |
||
53 | |||
54 | /** |
||
55 | * @param mixed $data |
||
56 | * @param Context $options |
||
57 | * @return mixed |
||
58 | * @throws \Swaggest\JsonSchema\InvalidValue |
||
59 | */ |
||
60 | public static function export($data, Context $options = null) |
||
64 | |||
65 | /** |
||
66 | * @param ObjectItemContract $objectItem |
||
67 | * @return static |
||
68 | */ |
||
69 | public static function pick(ObjectItemContract $objectItem) |
||
74 | |||
75 | /** |
||
76 | * @return static |
||
77 | */ |
||
78 | public static function create() |
||
82 | |||
83 | protected $__validateOnSet = true; // todo skip validation during import |
||
84 | |||
85 | public function jsonSerialize() |
||
107 | |||
108 | /** |
||
109 | * @return static |
||
110 | */ |
||
111 | public static function names() |
||
119 | |||
120 | public function __set($name, $column) // todo nested schemas |
||
130 | |||
131 | public static function className() |
||
135 | |||
136 | public function validate() |
||
140 | } |