| Total Complexity | 1 |
| Total Lines | 72 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class TableSelectEntity |
||
| 6 | { |
||
| 7 | /** |
||
| 8 | * The table name |
||
| 9 | * |
||
| 10 | * @var string |
||
| 11 | */ |
||
| 12 | public $table = ''; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * The fields to select |
||
| 16 | * |
||
| 17 | * @var array |
||
| 18 | */ |
||
| 19 | public $fields = []; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * The where clauses |
||
| 23 | * |
||
| 24 | * @var array |
||
| 25 | */ |
||
| 26 | public $where = []; |
||
| 27 | |||
| 28 | /** |
||
| 29 | * The group by clauses |
||
| 30 | * |
||
| 31 | * @var array |
||
| 32 | */ |
||
| 33 | public $group = []; |
||
| 34 | |||
| 35 | /** |
||
| 36 | * The order by clauses |
||
| 37 | * |
||
| 38 | * @var array |
||
| 39 | */ |
||
| 40 | public $order = []; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * The row limit |
||
| 44 | * |
||
| 45 | * @var int |
||
| 46 | */ |
||
| 47 | public $limit = 1; |
||
| 48 | |||
| 49 | /** |
||
| 50 | * The page number |
||
| 51 | * |
||
| 52 | * @var int |
||
| 53 | */ |
||
| 54 | public $page = 0; |
||
| 55 | |||
| 56 | /** |
||
| 57 | * The constructor |
||
| 58 | * |
||
| 59 | * @param string $table |
||
| 60 | * @param array $fields |
||
| 61 | * @param array $where |
||
| 62 | * @param array $group |
||
| 63 | * @param array $order |
||
| 64 | * @param int $limit |
||
| 65 | * @param int $page |
||
| 66 | */ |
||
| 67 | public function __construct(string $table, array $fields, array $where, |
||
| 79 |