public function setParent(&$parent)
	{
		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING, 'deprecated');

		if ($parent instanceof JNode || is_null($parent))
		{
			$hash = spl_object_hash($this);

			if (!is_null($this->_parent))
			{
				unset($this->_parent->children[$hash]);
			}

			if (!is_null($parent))
			{
				$parent->_children[$hash] = & $this;
			}

			$this->_parent = & $parent;
		}
	}
public function setParent(&$parent)
	{
		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING, 'deprecated');

		if ($parent instanceof JNode || is_null($parent))
		{
			$hash = spl_object_hash($this);

			if (!is_null($this->_parent))
			{
				unset($this->_parent->children[$hash]);
			}

			if (!is_null($parent))
			{
				$parent->_children[$hash] = & $this;
			}

			$this->_parent = & $parent;
		}
	}
public function setParent ( & $ parent ) { JLog :: add ( 'JNode::setParent() is deprecated.' , JLog :: WARNING , 'deprecated' ) ; if ( $ parent instanceof JNode || is_null ( $ parent ) ) { $ hash = spl_object_hash ( $ this ) ; if ( ! is_null ( $ this -> _parent ) ) { unset ( $ this -> _parent -> children [ $ hash ] ) ; } if ( ! is_null ( $ parent ) ) { $ parent -> _children [ $ hash ] = & $ this ; } $ this -> _parent = & $ parent ; } }
Set the parent of a this node

If the node already has a parent, the link is unset

@param   mixed  &$parent  The JNode for parent to be set or null

@return  void

@since    11.1
Set the parent of a this node