Match hidden tokens and add to $parent.
@param ParentNode $parent
170078
private function matchHidden(ParentNode $parent) {
    $parent->addChildren($this->getSkipNodes($this->skipped));
    $this->skipped = [];
    $this->skipParent = $parent;
  }
691252
protected function _processTree($parent)
    {
        $alphanum = '[\\\a-zA-Z0-9_\\x7f-\\xff]';
        $regex = "/(?<!\:|\\\$|\>|{$alphanum})(\s*)((?:exit|die)\s*)([\(|;])/m";

        foreach ($parent->tree as $node) {
            if ($node->processable && $node->type === 'code') {
                $node->body = preg_replace_callback($regex, function ($matches) {
                    return $matches[1] . '\Kahlan\Plugin\Quit::quit' . ($matches[3] === '(' ? '(' : '();');
                }, $node->body);
            }
            if (!empty($node->tree)) {
                $this->_processTree($node);
            }
        }
    }
78547
public function setParent(\marvin255\serviform\interfaces\Field $parent)
    {
        $this->parent = $parent;

        return $this;
    }
828007
public function canAddChild($parent, $child)
	{
		return \App::$domain->rbac->item->canAddChild($parent, $child);
	}
431182
public function parent($parent = null)
    {
        if ($parent === null) {
            return $this->_parent;
        }
        $this->_parent = $parent;

        return $this;
    }
1084505
function group_add_group($parent,$child){

        //find the parent group's dn
        $parent_group=$this->group_info($parent,array("cn"));
        if ($parent_group[0]["dn"]==NULL){ return (false); }
        $parent_dn=$parent_group[0]["dn"];
        
        //find the child group's dn
        $child_group=$this->group_info($child,array("cn"));
        if ($child_group[0]["dn"]==NULL){ return (false); }
        $child_dn=$child_group[0]["dn"];
                
        $add=array();
        $add["member"] = $child_dn;
        
        $result=@ldap_mod_add($this->_conn,$parent_dn,$add);
        if ($result==false){ return (false); }
        return (true);
    }
197627
public function setParent($parent){

            $this->parent = $parent;

            if($this->parentCallback){
                call_user_func($this->parentCallback);
            }

            return $this;

        }
765882
private function addParameters(\DOMElement $parent)
    {
        $data = $this->container->getParameterBag()->all();
        if (!$data) {
            return;
        }

        if ($this->container->isFrozen()) {
            $data = $this->escape($data);
        }

        $parameters = $this->document->createElement('parameters');
        $parent->appendChild($parameters);
        $this->convertParameters($data, 'parameter', $parameters);
    }
571397
@SuppressWarnings("unchecked")
  public void setParent(PvmExecutionImpl parent) {
    PvmExecutionImpl currentParent = getParent();

    setParentExecution(parent);

    if (currentParent != null) {
      currentParent.getExecutions().remove(this);
    }

    if (parent != null) {
      ((List<PvmExecutionImpl>) parent.getExecutions()).add(this);
    }
  }
449956
public function setParent($parent)
    {
        if (!empty($parent)) {
            $this->_parent = $this->_normalizeClass($parent);
        } else {
            $this->_parent = null;
        }

        return $this;
    }
382159
public function setParent(InnerNode $parent)
    {
        // remove from old parent
        if ( ! is_null($this->parent)) {
            if ($this->parent->id() == $parent->id()) {
                // already the parent
                return $this;
            }

            $this->parent->removeChild($this->id);
        }

        $this->parent = $parent;

        // assign child to parent
        $this->parent->addChild($this);

        //clear any cache
        $this->clear();

        return $this;
    }
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;
      }
    }
  }
1335309
public function setParent(self $parent = null)
    {
        $this->parent = $parent;
        if ($parent && !($this instanceof VirtualBusinessPage)) {
            $parent->addChild($this);
        }
    }
398685
public function setParent(\Haven\CmsBundle\Entity\HtmlContent $parent = null)
    {
        $this->parent = $parent;
    
        return $this;
    }
614483
private function establishBaseParametersFromParent($parent)
	{
		$this->set('parent_id', $parent->id);
		$this->set('level', $parent->level + 1);

		return $this->applyScopes($parent);
	}
582244
public function bindParent($parent, $parentPropertyName=NULL)
	{
		$this->_parent = $parent;
		$this->_parentPropertyName = $parentPropertyName;
		return $this;
	}
74660
public function addParentRoles($role, array $parents)
    {
        $role = $this->checkRole($role);
        $roleId = $role->getRoleId();
        if ($this->hasRole($roleId)) {
            foreach ($parents as $parent) {
                $parent = $this->checkRole($parent);
                $parentId = $parent->getRoleId();
                if ($this->hasRole($parentId)) {
                    array_push($this->roles[$roleId][self::NODE_PARENTS_ROLE], $parentId);
                } else {
                    throw new RoleNotExistException(
                        sprintf(
                            'Role parent %s not stored',
                            $roleId
                        )
                    );
                }
            }
            return true;
        } else {
            throw new RoleNotExistException(
                sprintf(
                    'Role %s not stored',
                    $roleId
                )
            );
        }
    }