| @@ 30-41 (lines=12) @@ | ||
| 27 | * | |
| 28 | * @return self | |
| 29 | */ | |
| 30 | public function addFields($fields) | |
| 31 |     { | |
| 32 |         if (!is_array($fields)) { | |
| 33 |             $fields = array_map(function ($f) { | |
| 34 | return trim($f); | |
| 35 |             }, explode(',', $fields)); | |
| 36 | } | |
| 37 | ||
| 38 | $this->fields = array_merge($this->fields, $fields); | |
| 39 | ||
| 40 | return $this; | |
| 41 | } | |
| 42 | ||
| 43 | public function clearFields() | |
| 44 |     { | |
| @@ 53-64 (lines=12) @@ | ||
| 50 | * | |
| 51 | * @return self | |
| 52 | */ | |
| 53 | public function addTable($tables) | |
| 54 |     { | |
| 55 |         if (!is_array($tables)) { | |
| 56 |             $tables = array_map(function ($t) { | |
| 57 | return trim($t); | |
| 58 |             }, explode(',', $tables)); | |
| 59 | } | |
| 60 | ||
| 61 | $this->tables = array_merge($this->tables, $tables); | |
| 62 | ||
| 63 | return $this; | |
| 64 | } | |
| 65 | ||
| 66 | /** | |
| 67 | * Adds a join condition to this statement | |