CoreFiles by mySites.guru
ImmutableNodeInterface.php76 lines, 1,561 bytes, from Joomla_4.2.0-beta3-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta2
md5
017d9a073f3a9eb2aae7f177c863333c
sha1
f918efa34b44675509d5147f7766adafc4ca92a3
sha256
a54b816ba0167c26d2d50e2adb8e52168170c1e0169877bbae1d7289fd778bb4
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2019 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Tree;

/**
 * Interface for an immutable node class
 *
 * @since  4.0.0
 */
interface ImmutableNodeInterface
{
    /**
     * Get the children of this node
     *
     * @param   boolean  $recursive  False by default
     *
     * @return  NodeInterface[]  The children
     *
     * @since   4.0.0
     */
    public function &getChildren($recursive = false);

    /**
     * Get the parent of this node
     *
     * @return  NodeInterface|null
     *
     * @since   4.0.0
     */
    public function getParent();

    /**
     * Get the root of the tree
     *
     * @return  ImmutableNodeInterface
     *
     * @since   4.0.0
     */
    public function getRoot();

    /**
     * Test if this node has children
     *
     * @return  boolean  True if there is a child
     *
     * @since   4.0.0
     */
    public function hasChildren();

    /**
     * Test if this node has a parent
     *
     * @return  boolean  True if there is a parent
     *
     * @since   4.0.0
     */
    public function hasParent();

    /**
     * Returns the right or left sibling of a node
     *
     * @param   boolean  $right  If set to false, returns the left sibling
     *
     * @return  NodeInterface|null  NodeInterface object of the sibling.
     *
     * @since   4.0.0
     */
    public function getSibling($right = true);
}

The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.