CoreFiles by mySites.guru
NodeInterface.php68 lines, 1,483 bytes, from Joomla_4.0.0-beta1-Beta-Full_Package.zip
Raw History Compare with 3.9.0-beta4
md5
f3e1000657c7f851c939cb7ef0a56d6a
sha1
ef3612741d3a06bd138b226dd898e5a84605d564
sha256
6903f368ccc26d6b58f3c0868b46cd59c9fdb0a9bfa3a2406d84a47eab13f82d
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2020 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Tree;

\defined('JPATH_PLATFORM') or die;

/**
 * Interface for a node class
 *
 * @since  4.0.0
 */
interface NodeInterface extends ImmutableNodeInterface
{
	/**
	 * Set the parent of this node
	 *
	 * If the node already has a parent, the link is unset
	 *
	 * @param   NodeInterface|null  $parent  NodeInterface for the parent to be set or null
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function setParent(NodeInterface $parent);

	/**
	 * Add child to this node
	 *
	 * If the child already has a parent, the link is unset
	 *
	 * @param   NodeInterface  $child  The child to be added.
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function addChild(NodeInterface $child);

	/**
	 * Remove a specific child
	 *
	 * @param   NodeInterface  $child  Child to remove
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function removeChild(NodeInterface $child);

	/**
	 * Function to set the left or right sibling of a node
	 *
	 * @param   NodeInterface  $sibling  NodeInterface object for the sibling
	 * @param   boolean        $right    If set to false, the sibling is the left one
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function setSibling(NodeInterface $sibling, $right = true);
}

The same content is in 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.