1<?php
2
3namespace PhpOffice\PhpSpreadsheet\Worksheet;
4
5class RowDimension extends Dimension
6{
7    /**
8     * Row index.
9     *
10     * @var int
11     */
12    private $rowIndex;
13
14    /**
15     * Row height (in pt).
16     *
17     * When this is set to a negative value, the row height should be ignored by IWriter
18     *
19     * @var float
20     */
21    private $height = -1;
22
23    /**
24     * ZeroHeight for Row?
25     *
26     * @var bool
27     */
28    private $zeroHeight = false;
29
30    /**
31     * Create a new RowDimension.
32     *
33     * @param int $pIndex Numeric row index
34     */
35    public function __construct($pIndex = 0)
36    {
37        // Initialise values
38        $this->rowIndex = $pIndex;
39
40        // set dimension as unformatted by default
41        parent::__construct(null);
42    }
43
44    /**
45     * Get Row Index.
46     *
47     * @return int
48     */
49    public function getRowIndex()
50    {
51        return $this->rowIndex;
52    }
53
54    /**
55     * Set Row Index.
56     *
57     * @param int $pValue
58     *
59     * @return RowDimension
60     */
61    public function setRowIndex($pValue)
62    {
63        $this->rowIndex = $pValue;
64
65        return $this;
66    }
67
68    /**
69     * Get Row Height.
70     *
71     * @return float
72     */
73    public function getRowHeight()
74    {
75        return $this->height;
76    }
77
78    /**
79     * Set Row Height.
80     *
81     * @param float $pValue
82     *
83     * @return RowDimension
84     */
85    public function setRowHeight($pValue)
86    {
87        $this->height = $pValue;
88
89        return $this;
90    }
91
92    /**
93     * Get ZeroHeight.
94     *
95     * @return bool
96     */
97    public function getZeroHeight()
98    {
99        return $this->zeroHeight;
100    }
101
102    /**
103     * Set ZeroHeight.
104     *
105     * @param bool $pValue
106     *
107     * @return RowDimension
108     */
109    public function setZeroHeight($pValue)
110    {
111        $this->zeroHeight = $pValue;
112
113        return $this;
114    }
115}
116