Re-bind parent

@param PHPExcel $parent
@return PHPExcel_Worksheet
350447
public function rebindParent(PHPExcel $parent) {
        $namedRanges = $this->_parent->getNamedRanges();
        foreach ($namedRanges as $namedRange) {
            $parent->addNamedRange($namedRange);
        }

        $this->_parent->removeSheetByIndex(
            $this->_parent->getIndex($this)
        );
        $this->_parent = $parent;

        return $this;
    }
78418
public function handleGetChildren($parent)
	{
		$this->setDataSource(
			call_user_func($this->tree_view_children_callback, $parent)
		);

		if ($this->getPresenter()->isAjax()) {
			$this->getPresenter()->payload->_datagrid_url = $this->refresh_url;
			$this->getPresenter()->payload->_datagrid_tree = $parent;

			$this->redrawControl('items');

			$this->onRedraw();
		} else {
			$this->getPresenter()->redirect('this');
		}
	}
1012492
public function copyCellCollection(PHPExcel_Worksheet $parent)
    {
        $this->currentCellIsDirty;
        $this->storeData();

        //    Get a new id for the new table name
        $tableName = str_replace('.', '_', $this->getUniqueID());
        if (!$this->DBHandle->queryExec('CREATE TABLE kvp_'.$tableName.' (id VARCHAR(12) PRIMARY KEY, value BLOB)
            AS SELECT * FROM kvp_'.$this->TableName)
        ) {
            throw new PHPExcel_Exception(sqlite_error_string($this->DBHandle->lastError()));
        }

        //    Copy the existing cell cache file
        $this->TableName = $tableName;
    }
1212719
protected function bindData(&$parent, $data)
  {
    if ( is_object($data) ){
      $data = get_object_vars($data);
    }
    else {
      $data = (array) $data;
    }
    
    foreach($data as $k => $v){
      if ( (is_array($v) && ArrayHelper::isAssociative($v)) || is_object($v) ){
        $parent->$k = new \stdClass;
        $this->bindData($parent->$k, $v);
      }
      else {
        $parent->$k = $v;
      }
    }
  }
1159841
public function setParent(\marvin255\serviform\interfaces\HasValidators $parent)
    {
        $this->parent = $parent;

        return $this;
    }
534178
public function setParent($parent)
    {
        if (empty($parent) || $this->getRefId() == $parent->getRefId() ||
            $parent->hasAncestor($this) || $this->hasReachedAncestorLimit()) {
            return false;
        }
        unset($this->parent);
        unset($parent->children);
        $this->trigger(static::$eventParentChanged);
        $parent->trigger(static::$eventChildAdded);
        return $this->{$this->parentAttribute} = $parent->getRefId();
    }
1274794
public function setParent(\Librinfo\VarietiesBundle\Entity\Variety $parent = null)
    {
        $this->parent = $parent;

        return $this;
    }
1102367
public static function unsetInstance(PHPExcel $workbook = NULL) {
		if ($workbook !== NULL) {
    		if (isset(self::$_workbookSets[$workbook->getID()])) {
    			unset(self::$_workbookSets[$workbook->getID()]);
    		}
		}
    }
322771
public function setHyperlink(PHPExcel_Cell_Hyperlink $pHyperlink = null)
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot set hyperlink for cell that is not bound to a worksheet');
        }

        $this->getWorksheet()->setHyperlink($this->getCoordinate(), $pHyperlink);

        return $this->notifyCacheController();
    }
780166
public function hasHyperlink()
    {
        if (!isset($this->parent)) {
            throw new PHPExcel_Exception('Cannot check for hyperlink when cell is not bound to a worksheet');
        }

        return $this->getWorksheet()->hyperlinkExists($this->getCoordinate());
    }
846245
public function setParent($parent, $from)
    {
        $this->parents()->set($parent, $parent instanceof Document ? $from : '*');
        return $this;
    }
1045118
public function setParentInstance(SiteTree $parent)
    {
        $this->parentInstance = $parent;
        
        $this->setStyleIDFrom($parent);
        
        return $this;
    }
626051
public function setParent(\Haven\CmsBundle\Entity\Page $parent = null) {
        $this->parent = $parent;

        return $this;
    }
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
410101
public function bindParent($parent, $parentPropertyName = null)
    {
        $this->parent = $parent;
        $this->parentPropertyName = $parentPropertyName;
        return $this;
    }
161791
public function setParent($parent) {
		if (! is_object($parent)) {
			throw new WrongParent('Parent of a helper must be an object, "' . gettype($parent) . '" was given');
		}
		
		$this->_parent = $parent;
		
		return $this;
	}
125591
public function copyCellCollection(PHPExcel_Worksheet $parent) {
		parent::copyCellCollection($parent);
		//	Get a new id for the new file name
		$baseUnique = $this->_getUniqueID();
		$newFileName = $this->_cacheDirectory.'/PHPExcel.'.$baseUnique.'.cache';
		//	Copy the existing cell cache file
		copy ($this->_fileName,$newFileName);
		$this->_fileName = $newFileName;
		//	Open the copied cell cache file
		$this->_fileHandle = fopen($this->_fileName,'a+');
	}