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 Column Interface |
| 14 | * |
| 15 | * @package CNIC |
| 16 | */ |
| 17 | |
| 18 | interface ColumnInterface |
| 19 | { |
| 20 | /** |
| 21 | * Constructor |
| 22 | * |
| 23 | * @param string $key Column Name |
| 24 | * @param string[] $data Column Data |
| 25 | */ |
| 26 | public function __construct(string $key, array $data); |
| 27 | |
| 28 | /** |
| 29 | * Get column name |
| 30 | * @return string column name |
| 31 | */ |
| 32 | public function getKey(): string; |
| 33 | |
| 34 | /** |
| 35 | * Get column data |
| 36 | * @return string[] column data |
| 37 | */ |
| 38 | public function getData(): array; |
| 39 | |
| 40 | /** |
| 41 | * Get column data at given index |
| 42 | * @param integer $idx data index |
| 43 | * @return string|null data at given index |
| 44 | */ |
| 45 | public function getDataByIndex($idx): ?string; |
| 46 | |
| 47 | /** |
| 48 | * Check if column has a given data index |
| 49 | * @param integer $idx data index |
| 50 | * @return bool result |
| 51 | */ |
| 52 | //private function hasDataIndex($idx): bool; |
| 53 | } |