Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
CRAP | |
100.00% |
1 / 1 |
| ExchangeSimpleQuery | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
2 | |
100.00% |
1 / 1 |
| fetchDataSet | |
100.00% |
6 / 6 |
|
100.00% |
1 / 1 |
2 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace BO\Zmsdb; |
| 4 | |
| 5 | use BO\Zmsentities\Exchange; |
| 6 | |
| 7 | abstract class ExchangeSimpleQuery extends Base |
| 8 | { |
| 9 | protected function fetchDataSet(Exchange $entity, $sql) |
| 10 | { |
| 11 | $raw = $this |
| 12 | ->getReader() |
| 13 | ->fetchAll($sql); |
| 14 | foreach ($raw as $entry) { |
| 15 | $entity->addDataSet(array_values($entry)); |
| 16 | } |
| 17 | return $entity; |
| 18 | } |
| 19 | /* |
| 20 | public function readSubjectList() |
| 21 | { |
| 22 | $entity = new Exchange(); |
| 23 | $entity['title'] = "Alle Standorte"; |
| 24 | $entity->setPeriod(new \DateTimeImmutable(), new \DateTimeImmutable()); |
| 25 | $entity->addDictionaryEntry('subject', 'string', 'ID'); |
| 26 | $entity->addDictionaryEntry('periodstart', 'string', 'Datum von'); |
| 27 | $entity->addDictionaryEntry('periodend', 'string', 'Datum bis'); |
| 28 | $entity->addDictionaryEntry('description', 'string', 'Beschreibung'); |
| 29 | $entity->addDataSet(["_", "", "", "Alle Standorte"]); |
| 30 | return $entity; |
| 31 | } |
| 32 | |
| 33 | public function readPeriodList() |
| 34 | { |
| 35 | $entity = new Exchange(); |
| 36 | $entity['title'] = "Alle Standorte"; |
| 37 | $entity->addDictionaryEntry('description', 'string', 'Beschreibung'); |
| 38 | $entity->addDataSet(["_"]); |
| 39 | return $entity; |
| 40 | } |
| 41 | */ |
| 42 | } |