title = new Title(); $this->legend = new Legend(); $this->plotArea = new PlotArea(); $this->view3D = new View3D(); // Initialize parent parent::__construct(); } public function __clone() { parent::__clone(); $this->title = clone $this->title; $this->legend = clone $this->legend; $this->plotArea = clone $this->plotArea; $this->view3D = clone $this->view3D; } /** * Get Title * * @return \PhpOffice\PhpPresentation\Shape\Chart\Title */ public function getTitle() { return $this->title; } /** * Get Legend * * @return \PhpOffice\PhpPresentation\Shape\Chart\Legend */ public function getLegend() { return $this->legend; } /** * Get PlotArea * * @return \PhpOffice\PhpPresentation\Shape\Chart\PlotArea */ public function getPlotArea() { return $this->plotArea; } /** * Get View3D * * @return \PhpOffice\PhpPresentation\Shape\Chart\View3D */ public function getView3D() { return $this->view3D; } /** * Include spreadsheet for editing data? Requires PHPExcel in the same folder as PhpPresentation * * @return boolean */ public function hasIncludedSpreadsheet() { return $this->includeSpreadsheet; } /** * Include spreadsheet for editing data? Requires PHPExcel in the same folder as PhpPresentation * * @param boolean $value * @return \PhpOffice\PhpPresentation\Shape\Chart */ public function setIncludeSpreadsheet($value = false) { $this->includeSpreadsheet = $value; return $this; } /** * Get indexed filename (using image index) * * @return string */ public function getIndexedFilename() { return 'chart' . $this->getImageIndex() . '.xml'; } /** * Get hash code * * @return string Hash code */ public function getHashCode() { return md5(parent::getHashCode() . $this->title->getHashCode() . $this->legend->getHashCode() . $this->plotArea->getHashCode() . $this->view3D->getHashCode() . ($this->includeSpreadsheet ? 1 : 0) . __CLASS__); } }