You are here

class PHPExcel_Shared_Escher_DgContainer_SpgrContainer in Loft Data Grids 7.2

Same name and namespace in other branches
  1. 6.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php \PHPExcel_Shared_Escher_DgContainer_SpgrContainer

PHPExcel_Shared_Escher_DgContainer_SpgrContainer

@category PHPExcel @package PHPExcel_Shared_Escher @copyright Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)

Hierarchy

Expanded class hierarchy of PHPExcel_Shared_Escher_DgContainer_SpgrContainer

1 string reference to 'PHPExcel_Shared_Escher_DgContainer_SpgrContainer'
PHPExcel_Writer_Excel5_Escher::close in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Escher.php
* Process the object to be written

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Shared/Escher/DgContainer/SpgrContainer.php, line 35

View source
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;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::$_children private property * Shape Container collection * *
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::$_parent private property * Parent Shape Group Container * *
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::addChild public function * Add a child. This will be either spgrContainer or spContainer * *
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::getAllSpContainers public function * Recursively get all spContainers within this spgrContainer * *
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::getChildren public function * Get collection of Shape Containers
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::getParent public function * Get the parent Shape Group Container if any * *
PHPExcel_Shared_Escher_DgContainer_SpgrContainer::setParent public function * Set parent Shape Group Container * *