CoreFiles by mySites.guru
tree.php104 lines, 1,843 bytes, from Joomla_3.9.13-Stable-Full_Package.zip
Raw History Compare with 3.9.12
md5
a6a8b4fae6edbd917ede9dad56866959
sha1
bedbdf6909b078aad766a95286a3e8d9e50b7f1a
sha256
ecf3a44380aa429eb64ea6a554426a67bad4586658e610477c6f46cefc77b1df
<?php
/**
 * @package     Joomla.Legacy
 * @subpackage  Base
 *
 * @copyright   Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('JPATH_PLATFORM') or die;

/**
 * Tree Class.
 *
 * @since       1.5
 * @deprecated  3.0
 */
class JTree extends JObject
{
	/**
	 * Root node
	 *
	 * @var    JNode
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_root = null;

	/**
	 * Current working node
	 *
	 * @var    JNode
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_current = null;

	/**
	 * Constructor
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function __construct()
	{
		JLog::add('JTree::__construct() is deprecated.', JLog::WARNING, 'deprecated');

		$this->_root = new JNode('ROOT');
		$this->_current = & $this->_root;
	}

	/**
	 * Method to add a child
	 *
	 * @param   array    &$node       The node to process
	 * @param   boolean  $setCurrent  True to set as current working node
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function addChild(&$node, $setCurrent = false)
	{
		JLog::add('JTree::addChild() is deprecated.', JLog::WARNING, 'deprecated');

		$this->_current->addChild($node);

		if ($setCurrent)
		{
			$this->_current = &$node;
		}
	}

	/**
	 * Method to get the parent
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function getParent()
	{
		JLog::add('JTree::getParent() is deprecated.', JLog::WARNING, 'deprecated');

		$this->_current = &$this->_current->getParent();
	}

	/**
	 * Method to get the parent
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function reset()
	{
		JLog::add('JTree::reset() is deprecated.', JLog::WARNING, 'deprecated');

		$this->_current = &$this->_root;
	}
}

The same content is in 26 releases, Joomla 3.9.2-rc to 3.9.14. See them all, or every version of this file.