HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/vhost/disk-apps/magento.bikenow.co/vendor/magento/framework/DB/Tree/Node.php
<?php
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */

namespace Magento\Framework\DB\Tree;

use Magento\Framework\Exception\LocalizedException;

/**
 * @SuppressWarnings(PHPMD.UnusedPrivateField)
 *
 * @deprecated 102.0.0 Not used anymore.
 */
class Node
{
    /**
     * @var int
     */
    private $left;

    /**
     * @var int
     */
    private $right;

    /**
     * @var string|int
     */
    private $id;

    /**
     * @var string|int
     */
    private $pid;

    /**
     * @var int
     */
    private $level;

    /**
     * @var string
     */
    private $title;

    /**
     * @var array
     */
    private $data;

    /**
     * @var bool
     *
     * @deprecated 102.0.0
     */
    public $hasChild = false;

    /**
     * @var float|int
     *
     * @deprecated 102.0.0
     */
    public $numChild = 0;

    /**
     * @param array $nodeData
     * @param array $keys
     * @throws LocalizedException
     *
     * @deprecated 102.0.0
     */
    public function __construct($nodeData, $keys)
    {
        if (empty($nodeData)) {
            throw new LocalizedException(
                new \Magento\Framework\Phrase('The node information is empty. Enter the information and try again.')
            );
        }
        if (empty($keys)) {
            throw new LocalizedException(
                new \Magento\Framework\Phrase("The encryption key can't be empty. Enter the key and try again.")
            );
        }

        $this->id = $nodeData[$keys['id']];
        $this->pid = $nodeData[$keys['pid']];
        $this->left = $nodeData[$keys['left']];
        $this->right = $nodeData[$keys['right']];
        $this->level = $nodeData[$keys['level']];

        $this->data = $nodeData;
        $a = $this->right - $this->left;
        if ($a > 1) {
            $this->hasChild = true;
            $this->numChild = ($a - 1) / 2;
        }
        return $this;
    }

    /**
     * @param string $name
     * @return null|array
     *
     * @deprecated 102.0.0
     */
    public function getData($name)
    {
        if (isset($this->data[$name])) {
            return $this->data[$name];
        } else {
            return null;
        }
    }

    /**
     * @return int
     *
     * @deprecated 102.0.0
     */
    public function getLevel()
    {
        return $this->level;
    }

    /**
     * @return int
     *
     * @deprecated 102.0.0
     */
    public function getLeft()
    {
        return $this->left;
    }

    /**
     * @return int
     *
     * @deprecated 102.0.0
     */
    public function getRight()
    {
        return $this->right;
    }

    /**
     * @return string|int
     *
     * @deprecated 102.0.0
     */
    public function getPid()
    {
        return $this->pid;
    }

    /**
     * @return string|int
     *
     * @deprecated 102.0.0
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Return true if node has child
     *
     * @return bool
     *
     * @deprecated 102.0.0
     */
    public function isParent()
    {
        if ($this->right - $this->left > 1) {
            return true;
        } else {
            return false;
        }
    }
}