/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/ObjectManager/Profiler/Tree/Item.php
105 строк
2 KB
Alexandra Zota
ACP2E-4362: Additional CE copyright updates for 2.4.9-beta1
29 ноя 2025, 18:29
29 ноя 2025, 18:29
27ab0ac
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ 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; } }