1 | <?php |
||
17 | class InsertContract extends Contract |
||
18 | { |
||
19 | |||
20 | private $dictionary = []; |
||
21 | |||
22 | /** |
||
23 | * Sets the input values. |
||
24 | * |
||
25 | * @param string $rootSchemaName The name of the root schema object. |
||
26 | */ |
||
27 | 6 | public function __construct($rootSchemaName) |
|
35 | |||
36 | /** |
||
37 | * Adds a ColumnExpression object to the dictionary collection. |
||
38 | * Returns the current object. |
||
39 | * |
||
40 | * @param string $name The name of the column. |
||
41 | * @param ColumnExpression $columnExpression Query expression to the schema object. |
||
42 | * |
||
43 | * @return self |
||
44 | */ |
||
45 | 2 | public function addColumn($name, ColumnExpression $columnExpression) |
|
50 | |||
51 | /** |
||
52 | * Returns data as an associative array. |
||
53 | * |
||
54 | * @return array |
||
55 | */ |
||
56 | 1 | public function toArray() |
|
73 | |||
74 | /** |
||
75 | * Validates contract data, throws an exception in case of an error. |
||
76 | * |
||
77 | * @throws ValidateException |
||
78 | */ |
||
79 | 2 | public function validate() |
|
85 | } |
||
86 |