| Conditions | 4 |
| Paths | 8 |
| Total Lines | 22 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function getData($breaks) |
||
| 16 | { |
||
| 17 | if (static::COUNT_LIMIT > 0) { |
||
| 18 | $breaks = array_slice($breaks, 0, static::COUNT_LIMIT); |
||
| 19 | } |
||
| 20 | |||
| 21 | sort($breaks, SORT_NUMERIC); |
||
| 22 | if ($breaks[0] == 0) { |
||
| 23 | // don't use first break if it's 0 |
||
| 24 | array_shift($breaks); |
||
| 25 | } |
||
| 26 | |||
| 27 | $cbrk = count($breaks); |
||
| 28 | $data = pack("v", $cbrk); |
||
| 29 | |||
| 30 | // Append each page break |
||
| 31 | foreach ($breaks as $break) { |
||
| 32 | $data .= pack("vvv", $break, 0x00, 0xff); |
||
| 33 | } |
||
| 34 | |||
| 35 | return $this->getFullRecord($data); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |