1<?php 2 3/** 4 * Rowspan class is used for handling rowspan in tables. 5 * 6 * @license GPL 2 http://www.gnu.org/licenses/gpl-2.0.html 7 * @author Adam Kučera <adam.kucera@wrent.cz> 8 */ 9 10/** 11 * Rowspan class representing rowspan itself and storing cell_id. 12 * The class exists mainly to encapsulate the data together. 13 */ 14class Rowspan { 15 /** 16 * Rowspan itself 17 * @var int 18 */ 19 protected $rowspan; 20 /** 21 * Id of a cell (order in a row), which started rowspan. 22 * @var int 23 */ 24 protected $cell_id; 25 26 /** 27 * Creates new rowspan 28 * @param int $rowspan Rowspan itself. 29 * @param int $cell_id Id of a cell. 30 */ 31 public function __construct($rowspan, $cell_id) { 32 $this->rowspan = $rowspan; 33 $this->cell_id = $cell_id; 34 } 35 /** 36 * Returns the rowspan 37 * @return int Rowspan 38 */ 39 public function getRowspan() { 40 return $this->rowspan; 41 } 42 43 /** 44 * Returns the cell id 45 * @return int Cell order in a row 46 */ 47 public function getCellId() { 48 return $this->cell_id; 49 } 50 51 /** 52 * Sets Rowspan 53 * @param int $rowspan 54 */ 55 public function setRowspan($rowspan) { 56 $this->rowspan = $rowspan; 57 } 58 59 /** 60 * Sets cell Id 61 * @param int $cell_id 62 */ 63 public function setCellId($cell_id) { 64 $this->cell_id = $cell_id; 65 } 66} 67