Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/node.php.tar

home/lmsyaran/public_html/j3/htaccess.back/legacy/base/node.php000064400000005760151157445020020464
0ustar00<?php
/**
 * @package     Joomla.Legacy
 * @subpackage  Base
 *
 * @copyright   Copyright (C) 2005 - 2020 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 Node Class.
 *
 * @since       1.5
 * @deprecated  3.0
 */
class JNode extends JObject
{
	/**
	 * Parent node
	 *
	 * @var    JNode
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_parent = null;

	/**
	 * Array of Children
	 *
	 * @var    JNode[]
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_children = array();

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

		return true;
	}

	/**
	 * Add child to this node
	 *
	 * If the child already has a parent, the link is unset
	 *
	 * @param   JNode  &$child  The child to be added
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function addChild(&$child)
	{
		JLog::add('JNode::addChild() is deprecated.', JLog::WARNING,
'deprecated');

		if ($child instanceof Jnode)
		{
			$child->setParent($this);
		}
	}

	/**
	 * Set the parent of a this node
	 *
	 * If the node already has a parent, the link is unset
	 *
	 * @param   JNode|null  &$parent  The JNode for parent to be set or
null
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function setParent(&$parent)
	{
		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING,
'deprecated');

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

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

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

			$this->_parent = & $parent;
		}
	}

	/**
	 * Get the children of this node
	 *
	 * @return  JNode[]  The children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getChildren()
	{
		JLog::add('JNode::getChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_children;
	}

	/**
	 * Get the parent of this node
	 *
	 * @return  JNode|null  JNode object with the parent or null for no parent
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getParent()
	{
		JLog::add('JNode::getParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_parent;
	}

	/**
	 * Test if this node has children
	 *
	 * @return  boolean  True if there are children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function hasChildren()
	{
		JLog::add('JNode::hasChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return (bool) count($this->_children);
	}

	/**
	 * Test if this node has a parent
	 *
	 * @return  boolean  True if there is a parent
	 *
	 * @since   1.6
	 * @deprecated  3.0
	 */
	public function hasParent()
	{
		JLog::add('JNode::hasParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->getParent() != null;
	}
}
home/lmsyaran/public_html/libraries/legacy/base/node.php000064400000005760151157470770017442
0ustar00<?php
/**
 * @package     Joomla.Legacy
 * @subpackage  Base
 *
 * @copyright   Copyright (C) 2005 - 2020 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 Node Class.
 *
 * @since       1.5
 * @deprecated  3.0
 */
class JNode extends JObject
{
	/**
	 * Parent node
	 *
	 * @var    JNode
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_parent = null;

	/**
	 * Array of Children
	 *
	 * @var    JNode[]
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_children = array();

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

		return true;
	}

	/**
	 * Add child to this node
	 *
	 * If the child already has a parent, the link is unset
	 *
	 * @param   JNode  &$child  The child to be added
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function addChild(&$child)
	{
		JLog::add('JNode::addChild() is deprecated.', JLog::WARNING,
'deprecated');

		if ($child instanceof Jnode)
		{
			$child->setParent($this);
		}
	}

	/**
	 * Set the parent of a this node
	 *
	 * If the node already has a parent, the link is unset
	 *
	 * @param   JNode|null  &$parent  The JNode for parent to be set or
null
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function setParent(&$parent)
	{
		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING,
'deprecated');

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

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

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

			$this->_parent = & $parent;
		}
	}

	/**
	 * Get the children of this node
	 *
	 * @return  JNode[]  The children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getChildren()
	{
		JLog::add('JNode::getChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_children;
	}

	/**
	 * Get the parent of this node
	 *
	 * @return  JNode|null  JNode object with the parent or null for no parent
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getParent()
	{
		JLog::add('JNode::getParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_parent;
	}

	/**
	 * Test if this node has children
	 *
	 * @return  boolean  True if there are children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function hasChildren()
	{
		JLog::add('JNode::hasChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return (bool) count($this->_children);
	}

	/**
	 * Test if this node has a parent
	 *
	 * @return  boolean  True if there is a parent
	 *
	 * @since   1.6
	 * @deprecated  3.0
	 */
	public function hasParent()
	{
		JLog::add('JNode::hasParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->getParent() != null;
	}
}
home/lmsyaran/public_html/administrator/components/com_dump/node.php000064400000005406151160625010022134
0ustar00<?php
/**
 * J!Dump
 * @version      $Id$
 * @package      jdump
 * @copyright    Copyright (C) 2006-2011 Mathias Verraes. All rights
reserved.
 * @license      GNU/GPL
 * @link         https://github.com/mathiasverraes/jdump
 */
defined( '_JEXEC' ) or die( 'Restricted access' );

class DumpNode 
{

	static function & getNode($var, $name, $type = null, $level = 0,
$source = null) 
	{

		$node['name']       = $name;
		$node['type']       = strtolower($type ? $type : gettype( $var
));
		$node['children']   = array();
		$node['level']      = $level;
				$node['source']     = $source;

		// expand the var according to type
		switch ($node['type']) 
		{
			case 'backtrace': // Skip source when backtrace, and change to
array
				$node['source'] = null;
				$node['type']   = 'array';

			case 'array':
				if ($level >= DumpHelper::getMaxDepth()) 
				{
					$node['children'][] = DumpNode::getNode('Maximum depth
reached', null, 'message');
				} 
				else 
				{
					ksort($var);
					foreach ($var as $key => $value) 
					{
						$node['children'][] = DumpNode::getNode($value, $key, null,
$level + 1);
					}
				}
				break;

			case 'object':
				if ($level >= DumpHelper::getMaxDepth()) 
				{
					$node['children'][] = DumpNode::getNode('Maximum depth
reached', null, 'message');
				} 
				else 
				{
					$object_vars = get_object_vars($var) ;
					$methods     = get_class_methods($var) ;
					if (count($object_vars)) 
					{
						$node['children'][] = DumpNode::getNode($var,
'Properties', 'properties', $level);
					}
					if (count($methods)) 
					{
						$node['children'][] = DumpNode::getNode($var,
'Methods', 'methods', $level);
					}
				}
				$node['classname'] = get_class($var);
				break;

			case 'properties':
				$object_vars = get_object_vars($var);
				ksort($object_vars);
				foreach ($object_vars as $key => $value) 
				{
					$node['children'][] = DumpNode::getNode($value, $key, null,
$level + 1);
				}
				break;

			case 'methods':
				$methods = get_class_methods($var);
				sort($methods);
				foreach ($methods as $value) 
				{
					$node['children'][] = DumpNode::getNode(null, $value,
'method');
				}
				break;


			case 'string':
				jimport('joomla.application.component.helper');
				// settings from config.xml
				$dumpConfig		= JComponentHelper::getParams('com_dump');
				$trimstrings	= $dumpConfig->get('trimstrings', 1);
				$maxstrlength	= $dumpConfig->get('maxstrlength', 150);

				//original string length
				$length			= JString::strlen($var);

				// trim string if needed
				if ($trimstrings AND $length > $maxstrlength) 
				{
					$var = JString::substr($var, 0, $maxstrlength) . '...';
					$node['length'] = $length;
				}

				$node['value']	= $var;
				break;

			default:
				$node['value'] = & $var;
				break;

		}

		return $node;
	}

}
home/lmsyaran/public_html/j3/libraries/legacy/base/node.php000064400000005760151161421070017736
0ustar00<?php
/**
 * @package     Joomla.Legacy
 * @subpackage  Base
 *
 * @copyright   Copyright (C) 2005 - 2020 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 Node Class.
 *
 * @since       1.5
 * @deprecated  3.0
 */
class JNode extends JObject
{
	/**
	 * Parent node
	 *
	 * @var    JNode
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_parent = null;

	/**
	 * Array of Children
	 *
	 * @var    JNode[]
	 * @since  1.5
	 * @deprecated  3.0
	 */
	protected $_children = array();

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

		return true;
	}

	/**
	 * Add child to this node
	 *
	 * If the child already has a parent, the link is unset
	 *
	 * @param   JNode  &$child  The child to be added
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function addChild(&$child)
	{
		JLog::add('JNode::addChild() is deprecated.', JLog::WARNING,
'deprecated');

		if ($child instanceof Jnode)
		{
			$child->setParent($this);
		}
	}

	/**
	 * Set the parent of a this node
	 *
	 * If the node already has a parent, the link is unset
	 *
	 * @param   JNode|null  &$parent  The JNode for parent to be set or
null
	 *
	 * @return  void
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function setParent(&$parent)
	{
		JLog::add('JNode::setParent() is deprecated.', JLog::WARNING,
'deprecated');

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

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

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

			$this->_parent = & $parent;
		}
	}

	/**
	 * Get the children of this node
	 *
	 * @return  JNode[]  The children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getChildren()
	{
		JLog::add('JNode::getChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_children;
	}

	/**
	 * Get the parent of this node
	 *
	 * @return  JNode|null  JNode object with the parent or null for no parent
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function &getParent()
	{
		JLog::add('JNode::getParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->_parent;
	}

	/**
	 * Test if this node has children
	 *
	 * @return  boolean  True if there are children
	 *
	 * @since   1.5
	 * @deprecated  3.0
	 */
	public function hasChildren()
	{
		JLog::add('JNode::hasChildren() is deprecated.', JLog::WARNING,
'deprecated');

		return (bool) count($this->_children);
	}

	/**
	 * Test if this node has a parent
	 *
	 * @return  boolean  True if there is a parent
	 *
	 * @since   1.6
	 * @deprecated  3.0
	 */
	public function hasParent()
	{
		JLog::add('JNode::hasParent() is deprecated.', JLog::WARNING,
'deprecated');

		return $this->getParent() != null;
	}
}
home/lmsyaran/public_html/j3/administrator/components/com_dump/node.php000064400000005406151163543270022462
0ustar00<?php
/**
 * J!Dump
 * @version      $Id$
 * @package      jdump
 * @copyright    Copyright (C) 2006-2011 Mathias Verraes. All rights
reserved.
 * @license      GNU/GPL
 * @link         https://github.com/mathiasverraes/jdump
 */
defined( '_JEXEC' ) or die( 'Restricted access' );

class DumpNode 
{

	static function & getNode($var, $name, $type = null, $level = 0,
$source = null) 
	{

		$node['name']       = $name;
		$node['type']       = strtolower($type ? $type : gettype( $var
));
		$node['children']   = array();
		$node['level']      = $level;
				$node['source']     = $source;

		// expand the var according to type
		switch ($node['type']) 
		{
			case 'backtrace': // Skip source when backtrace, and change to
array
				$node['source'] = null;
				$node['type']   = 'array';

			case 'array':
				if ($level >= DumpHelper::getMaxDepth()) 
				{
					$node['children'][] = DumpNode::getNode('Maximum depth
reached', null, 'message');
				} 
				else 
				{
					ksort($var);
					foreach ($var as $key => $value) 
					{
						$node['children'][] = DumpNode::getNode($value, $key, null,
$level + 1);
					}
				}
				break;

			case 'object':
				if ($level >= DumpHelper::getMaxDepth()) 
				{
					$node['children'][] = DumpNode::getNode('Maximum depth
reached', null, 'message');
				} 
				else 
				{
					$object_vars = get_object_vars($var) ;
					$methods     = get_class_methods($var) ;
					if (count($object_vars)) 
					{
						$node['children'][] = DumpNode::getNode($var,
'Properties', 'properties', $level);
					}
					if (count($methods)) 
					{
						$node['children'][] = DumpNode::getNode($var,
'Methods', 'methods', $level);
					}
				}
				$node['classname'] = get_class($var);
				break;

			case 'properties':
				$object_vars = get_object_vars($var);
				ksort($object_vars);
				foreach ($object_vars as $key => $value) 
				{
					$node['children'][] = DumpNode::getNode($value, $key, null,
$level + 1);
				}
				break;

			case 'methods':
				$methods = get_class_methods($var);
				sort($methods);
				foreach ($methods as $value) 
				{
					$node['children'][] = DumpNode::getNode(null, $value,
'method');
				}
				break;


			case 'string':
				jimport('joomla.application.component.helper');
				// settings from config.xml
				$dumpConfig		= JComponentHelper::getParams('com_dump');
				$trimstrings	= $dumpConfig->get('trimstrings', 1);
				$maxstrlength	= $dumpConfig->get('maxstrlength', 150);

				//original string length
				$length			= JString::strlen($var);

				// trim string if needed
				if ($trimstrings AND $length > $maxstrlength) 
				{
					$var = JString::substr($var, 0, $maxstrlength) . '...';
					$node['length'] = $length;
				}

				$node['value']	= $var;
				break;

			default:
				$node['value'] = & $var;
				break;

		}

		return $node;
	}

}