1 | <?php |
||
27 | class SpgrContainer |
||
28 | { |
||
29 | /** |
||
30 | * Parent Shape Group Container. |
||
31 | * |
||
32 | * @var \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer |
||
33 | */ |
||
34 | private $parent; |
||
35 | |||
36 | /** |
||
37 | * Shape Container collection. |
||
38 | * |
||
39 | * @var array |
||
40 | */ |
||
41 | private $children = []; |
||
42 | |||
43 | /** |
||
44 | * Set parent Shape Group Container. |
||
45 | * |
||
46 | * @param \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer $parent |
||
47 | */ |
||
48 | public function setParent($parent) |
||
52 | |||
53 | /** |
||
54 | * Get the parent Shape Group Container if any. |
||
55 | * |
||
56 | * @return \PhpOffice\PhpSpreadsheet\Shared\Escher\DgContainer\SpgrContainer|null |
||
57 | */ |
||
58 | 3 | public function getParent() |
|
62 | |||
63 | /** |
||
64 | * Add a child. This will be either spgrContainer or spContainer. |
||
65 | * |
||
66 | * @param mixed $child |
||
67 | */ |
||
68 | 10 | public function addChild($child) |
|
73 | |||
74 | /** |
||
75 | * Get collection of Shape Containers. |
||
76 | */ |
||
77 | 10 | public function getChildren() |
|
78 | { |
||
79 | 10 | return $this->children; |
|
80 | } |
||
81 | |||
82 | /** |
||
83 | * Recursively get all spContainers within this spgrContainer. |
||
84 | * |
||
85 | * @return SpgrContainer\SpContainer[] |
||
86 | */ |
||
87 | 3 | public function getAllSpContainers() |
|
101 | } |
||
102 |