Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
|||
| 1 | <?php |
| 2 | |
| 3 | #declare(strict_types=1); |
| 4 | |
| 5 | /** |
| 6 | * CNIC |
| 7 | * Copyright © CentralNic Group PLC |
| 8 | */ |
| 9 | |
| 10 | namespace CNIC; |
| 11 | |
| 12 | /** |
| 13 | * Common Record Interface |
| 14 | * |
| 15 | * @package CNIC |
| 16 | */ |
| 17 | |
| 18 | interface RecordInterface |
| 19 | { |
| 20 | /** |
| 21 | * Constructor |
| 22 | * e.g. |
| 23 | * <code> |
| 24 | * $data = [ |
| 25 | * "DOMAIN" => "mydomain.com", |
| 26 | * "USER" => "test.user", |
| 27 | * // ... further column data ... |
| 28 | * ]; |
| 29 | * </code> |
| 30 | * @param array $data data object |
| 31 | */ |
| 32 | public function __construct(array $data); |
| 33 | |
| 34 | /** |
| 35 | * get row data |
| 36 | * @return array row data |
| 37 | */ |
| 38 | public function getData(): array; |
| 39 | |
| 40 | /** |
| 41 | * get row data for given column |
| 42 | * @param string $key column name |
| 43 | * @return string|null row data for given column or null if column does not exist |
| 44 | */ |
| 45 | public function getDataByKey($key): ?string; |
| 46 | |
| 47 | /** |
| 48 | * check if record has data for given column |
| 49 | * @param string $key column name |
| 50 | * @return bool boolean result |
| 51 | */ |
| 52 | //private function hasData($key): bool; |
| 53 | } |