1 | <?php |
||
23 | class Contract extends StorageArray |
||
24 | { |
||
25 | /** |
||
26 | * Type of operation with record SELECT for sampling data. |
||
27 | */ |
||
28 | const SELECT = 0; |
||
29 | |||
30 | /** |
||
31 | * Type of operation with record INSERT to insert data. |
||
32 | */ |
||
33 | const INSERT = 1; |
||
34 | |||
35 | /** |
||
36 | * Type of operation with record UPDATE to update the data. |
||
37 | */ |
||
38 | const UPDATE = 2; |
||
39 | |||
40 | /** |
||
41 | * Type of operation with record DELETE to delete data. |
||
42 | */ |
||
43 | const DELETE = 3; |
||
44 | |||
45 | /** |
||
46 | * Type of operation with record BATCH for group queries. |
||
47 | */ |
||
48 | //const BATCH = 4; |
||
49 | |||
50 | /** |
||
51 | * The endpoint for the SELECT operation. |
||
52 | */ |
||
53 | const SELECT_QUERY = 'SelectQuery'; |
||
54 | |||
55 | /** |
||
56 | * The endpoint for the INSERT operation. |
||
57 | */ |
||
58 | const INSERT_QUERY = 'InsertQuery'; |
||
59 | |||
60 | /** |
||
61 | * The endpoint for the UPDATE operation. |
||
62 | */ |
||
63 | const UPDATE_QUERY = 'UpdateQuery'; |
||
64 | |||
65 | /** |
||
66 | * The endpoint for the DELETE operation. |
||
67 | */ |
||
68 | const DELETE_QUERY = 'DeleteQuery'; |
||
69 | |||
70 | /** |
||
71 | * The endpoint for the BATCH operation. |
||
72 | */ |
||
73 | //const BATCH_QUERY = 'BatchQuery'; |
||
74 | |||
75 | /** |
||
76 | * List of supported fields. |
||
77 | * |
||
78 | * @var array |
||
79 | */ |
||
80 | protected $fields = [ |
||
81 | /** |
||
82 | * The name of the root schema object. |
||
83 | */ |
||
84 | 'rootSchemaName' => '', |
||
85 | |||
86 | /** |
||
87 | * Record operation type. |
||
88 | */ |
||
89 | 'operationType' => null, |
||
90 | |||
91 | /** |
||
92 | * Determination of the contract to fulfill the request in the API. |
||
93 | */ |
||
94 | 'contractType' => null, |
||
95 | ]; |
||
96 | |||
97 | /** |
||
98 | * Validates contract data, throws an exception in case of an error. |
||
99 | * |
||
100 | * @throws ValidateException |
||
101 | */ |
||
102 | 1 | public function validate() |
|
106 | } |
||
107 |