ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
SpgrContainer.php
Go to the documentation of this file.
1 <?php
36 {
42  private $_parent;
43 
49  private $_children = array();
50 
56  public function setParent($parent)
57  {
58  $this->_parent = $parent;
59  }
60 
66  public function getParent()
67  {
68  return $this->_parent;
69  }
70 
76  public function addChild($child)
77  {
78  $this->_children[] = $child;
79  $child->setParent($this);
80  }
81 
85  public function getChildren()
86  {
87  return $this->_children;
88  }
89 
95  public function getAllSpContainers()
96  {
97  $allSpContainers = array();
98 
99  foreach ($this->_children as $child) {
100  if ($child instanceof PHPExcel_Shared_Escher_DgContainer_SpgrContainer) {
101  $allSpContainers = array_merge($allSpContainers, $child->getAllSpContainers());
102  } else {
103  $allSpContainers[] = $child;
104  }
105  }
106 
107  return $allSpContainers;
108  }
109 }