From c98b4e708e0ea5094e3ea8b45f1c12ebd08eb3b9 Mon Sep 17 00:00:00 2001 From: M_Viper Date: Sun, 10 Mar 2024 15:35:44 +0000 Subject: [PATCH] Dateien nach "includes/PHPExcel/Classes/PHPExcel/Shared/Escher/DgContainer" hochladen --- .../Escher/DgContainer/SpgrContainer.php | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 includes/PHPExcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php diff --git a/includes/PHPExcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php b/includes/PHPExcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php new file mode 100644 index 0000000..b8ad8ea --- /dev/null +++ b/includes/PHPExcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php @@ -0,0 +1,109 @@ +_parent = $parent; + } + + /** + * Get the parent Shape Group Container if any + * + * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer|null + */ + public function getParent() + { + return $this->_parent; + } + + /** + * Add a child. This will be either spgrContainer or spContainer + * + * @param mixed $child + */ + public function addChild($child) + { + $this->_children[] = $child; + $child->setParent($this); + } + + /** + * Get collection of Shape Containers + */ + public function getChildren() + { + return $this->_children; + } + + /** + * Recursively get all spContainers within this spgrContainer + * + * @return PHPExcel_Shared_Escher_DgContainer_SpgrContainer_SpContainer[] + */ + public function getAllSpContainers() + { + $allSpContainers = array(); + + foreach ($this->_children as $child) { + if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) { + $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers()); + } else { + $allSpContainers[] = $child; + } + } + + return $allSpContainers; + } +}