@@ 180-189 (lines=10) @@ | ||
177 | * |
|
178 | * @throws NodeException If row with specified index does not exist |
|
179 | */ |
|
180 | public function getRow($index) |
|
181 | { |
|
182 | $rows = $this->getRows(); |
|
183 | ||
184 | if (!isset($rows[$index])) { |
|
185 | throw new NodeException(sprintf('Rows #%d does not exist in table.', $index)); |
|
186 | } |
|
187 | ||
188 | return $rows[$index]; |
|
189 | } |
|
190 | ||
191 | /** |
|
192 | * Returns specific column in a table. |
|
@@ 225-234 (lines=10) @@ | ||
222 | * |
|
223 | * @throws NodeException If row with specified index does not exist |
|
224 | */ |
|
225 | public function getRowLine($index) |
|
226 | { |
|
227 | $lines = array_keys($this->table); |
|
228 | ||
229 | if (!isset($lines[$index])) { |
|
230 | throw new NodeException(sprintf('Rows #%d does not exist in table.', $index)); |
|
231 | } |
|
232 | ||
233 | return $lines[$index]; |
|
234 | } |
|
235 | ||
236 | /** |
|
237 | * Converts row into delimited string. |