| Total Complexity | 5 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Test extends Model |
||
| 10 | { |
||
| 11 | protected $collection = 'test'; |
||
| 12 | |||
| 13 | public function __construct(ConfigInterface $config = null) |
||
| 14 | { |
||
| 15 | // Unfortunately this part yet is not ready, so you can use temporary solution |
||
| 16 | $config = new Config(); |
||
| 17 | $config->load(__DIR__ . '/database.php', 'database'); |
||
| 18 | parent::__construct($config); |
||
| 19 | } |
||
| 20 | |||
| 21 | public function sql_select() |
||
| 22 | { |
||
| 23 | return $this->select('SELECT * FROM prefix_test'); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function sql_insert(array $data = ['key' => 'value', 'key2' => 'value2']) |
||
| 27 | { |
||
| 28 | return $this->insert($data); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function sql_update(int $id) |
||
| 36 | } |
||
| 37 | |||
| 38 | public function sql_delete(array $data) |
||
| 41 | } |
||
| 42 | } |
||
| 43 |