/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/App/Config/Element.php
58 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ /** * Config element model */ namespace Magento\Framework\App\Config; /** * @api * @since 100.0.2 */ class Element extends \Magento\Framework\Simplexml\Element { /** * Enter description here... * * @param string $var * @param boolean $value * @return boolean * @SuppressWarnings(PHPMD.ShortMethodName) */ public function is($var, $value = true) { $flag = $this->{$var}; if ($value === true) { $flag = strtolower((string)$flag); if (!empty($flag) && 'false' !== $flag && 'off' !== $flag) { return true; } else { return false; } } return !empty($flag) && 0 === strcasecmp($value, (string)$flag); } /** * Enter description here... * * @return string */ public function getClassName() { if ($this->class) { $model = (string)$this->class; } elseif ($this->model) { $model = (string)$this->model; } else { return false; } return $model; } }