lineWidth = 1; $this->lineStyle = self::LINE_SINGLE; $this->dashStyle = self::DASH_SOLID; $this->color = new Color(Color::COLOR_BLACK); } /** * Get line width (in points) * * @return int */ public function getLineWidth() { return $this->lineWidth; } /** * Set line width (in points) * * @param int $pValue * @return \PhpOffice\PhpPresentation\Style\Border */ public function setLineWidth($pValue = 1) { $this->lineWidth = $pValue; return $this; } /** * Get line style * * @return string */ public function getLineStyle() { return $this->lineStyle; } /** * Set line style * * @param string $pValue * @return \PhpOffice\PhpPresentation\Style\Border */ public function setLineStyle($pValue = self::LINE_SINGLE) { if ($pValue == '') { $pValue = self::LINE_SINGLE; } $this->lineStyle = $pValue; return $this; } /** * Get dash style * * @return string */ public function getDashStyle() { return $this->dashStyle; } /** * Set dash style * * @param string $pValue * @return \PhpOffice\PhpPresentation\Style\Border */ public function setDashStyle($pValue = self::DASH_SOLID) { if ($pValue == '') { $pValue = self::DASH_SOLID; } $this->dashStyle = $pValue; return $this; } /** * Get Border Color * * @return \PhpOffice\PhpPresentation\Style\Color */ public function getColor() { return $this->color; } /** * Set Border Color * * @param \PhpOffice\PhpPresentation\Style\Color $color * @throws \Exception * @return \PhpOffice\PhpPresentation\Style\Border */ public function setColor(Color $color = null) { $this->color = $color; return $this; } /** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5( $this->lineStyle . $this->lineWidth . $this->dashStyle . $this->color->getHashCode() . __CLASS__ ); } /** * Get hash index * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @return string Hash index */ public function getHashIndex() { return $this->hashIndex; } /** * Set hash index * * Note that this index may vary during script execution! Only reliable moment is * while doing a write of a workbook and when changes are not allowed. * * @param string $value Hash index */ public function setHashIndex($value) { $this->hashIndex = $value; } }