1 | <?php |
||
20 | class UpdateCommand extends TableCommand implements ContextualCommandInterface |
||
21 | { |
||
22 | use ContextTrait, PrimaryTrait, WhereTrait; |
||
23 | |||
24 | /** |
||
25 | * Columns to be updated. |
||
26 | * |
||
27 | * @var array |
||
28 | */ |
||
29 | private $values = []; |
||
30 | |||
31 | /** |
||
32 | * UpdateCommand constructor. |
||
33 | * |
||
34 | * @param Table $table |
||
35 | * @param array $where |
||
36 | * @param array $values |
||
37 | * @param mixed $primaryKey |
||
38 | */ |
||
39 | public function __construct(Table $table, array $where, array $values = [], $primaryKey = null) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function getDriver() |
||
59 | |||
60 | /** |
||
61 | * {@inheritdoc} |
||
62 | */ |
||
63 | public function isEmpty(): bool |
||
67 | |||
68 | /** |
||
69 | * Update values, context not included. |
||
70 | * |
||
71 | * @return array |
||
72 | */ |
||
73 | public function getValues(): array |
||
77 | |||
78 | /** |
||
79 | * Inserting data into associated table. |
||
80 | */ |
||
81 | public function execute() |
||
89 | } |