Completed
Push — master ( 47fad5...a0a464 )
by Mr
02:35
created

Test::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
1
<?php
2
3
namespace DrMVC\Models;
4
5
use DrMVC\Config;
6
use DrMVC\Config\ConfigInterface;
7
use DrMVC\Database\Model;
8
9
class Test extends Model
10
{
11
    //protected $collection = 'test';
12
13
    public function sql_select()
14
    {
15
        return $this->select('SELECT * FROM prefix_test');
16
    }
17
18
    public function sql_insert(array $data = ['key' => 'value', 'key2' => 'value2'])
19
    {
20
        return $this->insert($data);
21
    }
22
23
    public function sql_update(int $id)
24
    {
25
        $data = ['key' => 'value', 'key2' => 'value2'];
26
        $where = ['id' => $id];
27
        return $this->update($data, $where);
28
    }
29
30
    public function sql_delete(array $data)
31
    {
32
        return $this->delete($data);
33
    }
34
}
35