![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/vendor/magento/framework/ObjectManager/Profiler/Tree/ |
<?php /** * * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ namespace Magento\Framework\ObjectManager\Profiler\Tree; class Item { /** * @var string */ protected $class; /** * @var Item|null */ protected $parent = null; /** * @var string */ protected $hash = null; /** * @var array */ protected $children = []; /** * @param string $class * @param Item $parent */ public function __construct($class, Item $parent = null) { $this->class = $class; $this->parent = $parent; if ($parent) { $parent->addChild($this); } } /** * Retrieve class * * @return string */ public function getClass() { return $this->class; } /** * Add child * * @param Item $item * @return void */ public function addChild(Item $item) { $this->children[] = $item; } /** * Retrieve list of children * * @return array[Item] */ public function getChildren() { return $this->children; } /** * Retrieve parent * * @return Item|null */ public function getParent() { return $this->parent; } /** * Set hash * * @param string $hash * @return void */ public function setHash($hash) { $this->hash = $hash; } /** * Retrieve hash * * @return string */ public function getHash() { return $this->hash; } }