1 | <?php |
||
29 | class Row extends AbstractRow |
||
30 | { |
||
31 | /** |
||
32 | * @var array Same as fields only indexed using headers rather than numbers |
||
33 | */ |
||
34 | protected $assocCols = []; |
||
35 | |||
36 | /** |
||
37 | * @var array The headers for this row |
||
38 | */ |
||
39 | protected $headers = []; |
||
40 | |||
41 | /** |
||
42 | * Get the current key (column number or header, if available) |
||
43 | * |
||
44 | * @return string The "current" key |
||
45 | * @access public |
||
46 | * @todo Figure out if this can return a CSVelte\Table\HeaderData object so long as it |
||
47 | * has a __toString() method that generated the right key... |
||
48 | */ |
||
49 | 14 | public function key() |
|
53 | |||
54 | /** |
||
55 | * Set the header row (so that it can be used to index the row) |
||
56 | * |
||
57 | * @param \CSVelte\Table\HeaderRow $headers Header row to set |
||
58 | * @return void (return $this?) |
||
59 | * @access public |
||
60 | */ |
||
61 | 20 | public function setHeaderRow(AbstractRow $headers) |
|
80 | |||
81 | /** |
||
82 | * Is there an offset at specified position? |
||
83 | * |
||
84 | * @param integer Offset |
||
85 | * @return boolean |
||
86 | * @access public |
||
87 | */ |
||
88 | 5 | public function offsetExists($offset) |
|
98 | |||
99 | /** |
||
100 | * Retrieve data at specified column offset |
||
101 | * |
||
102 | * @param integer Offset |
||
103 | * @return CSVelte\Table\Data |
||
104 | * @access public |
||
105 | */ |
||
106 | 9 | public function offsetGet($offset) |
|
115 | } |
||
116 |