Total Complexity | 4 |
Total Lines | 22 |
Duplicated Lines | 0 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
8 | class Delete extends BaseAction |
||
9 | { |
||
10 | protected function execute() |
||
11 | { |
||
12 | $conditions = $this->getConditions(); |
||
13 | |||
14 | if (empty($conditions)) { |
||
15 | return; |
||
16 | } |
||
17 | |||
18 | $delete = new \Sirius\Sql\Delete($this->mapper->getWriteConnection()); |
||
19 | $delete->from($this->mapper->getTable()); |
||
20 | $delete->whereAll($conditions, false); |
||
21 | |||
22 | $delete->perform(); |
||
23 | } |
||
24 | |||
25 | public function onSuccess() |
||
30 | } |
||
31 | } |
||
33 |