| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- <?php
- /**
- * 重庆赤晓店信息科技有限公司
- * https://www.chixiaodian.com
- * Copyright (c) 2023 赤店商城 All rights reserved.
- */
- class PHPExcel_Shared_Escher_DgContainer_SpgrContainer
- {
- /**
- * Parent Shape Group Container
- *
- * @var PHPExcel_Shared_Escher_DgContainer_SpgrContainer
- */
- private $parent;
- /**
- * Shape Container collection
- *
- * @var array
- */
- private $children = array();
- /**
- * Set parent Shape Group Container
- *
- * @param PHPExcel_Shared_Escher_DgContainer_SpgrContainer $parent
- */
- public function setParent($parent)
- {
- $this->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;
- }
- }
|