| 1 | <?php |
||
| 6 | class Database |
||
| 7 | { |
||
| 8 | |||
| 9 | public $conn; |
||
| 10 | |||
| 11 | function __construct(\PDO $pdo){ |
||
| 14 | |||
| 15 | |||
| 16 | function queryHandler($clause, $query, $param){ |
||
| 36 | |||
| 37 | function select($query, array $param = []){ |
||
| 41 | |||
| 42 | function update($query, array $param = []){ |
||
| 46 | |||
| 47 | function delete($query, array $param = []){ |
||
| 51 | |||
| 52 | function insert($query, array $param = []){ |
||
| 56 | |||
| 57 | } |
||
| 58 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.