| 1 | <?php |
||
| 14 | class DefaultRowBuilder implements RowBuilderInterface |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * XML constant for row strings. |
||
| 18 | */ |
||
| 19 | const ROW_XML = '<row r="%d" spans="1:%d">%s</row>'; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var CellBuilderInterface |
||
| 23 | */ |
||
| 24 | private $cellBuilder; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Counter for the current row index, |
||
| 28 | * increases by 1 for every added row. |
||
| 29 | * |
||
| 30 | * @var int |
||
| 31 | */ |
||
| 32 | private $rowNumber = 1; |
||
| 33 | |||
| 34 | /** |
||
| 35 | * RowBuilder constructor. |
||
| 36 | * @param CellBuilderInterface $cellBuilder |
||
| 37 | */ |
||
| 38 | 4 | public function __construct(CellBuilderInterface $cellBuilder) |
|
| 42 | |||
| 43 | /** |
||
| 44 | * Build XML string for a single data row and return it. |
||
| 45 | * |
||
| 46 | * @param array $dataRow |
||
| 47 | * @param int $styleId |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | 2 | public function build(array $dataRow, $styleId = 0) |
|
| 59 | } |
||
| 60 |