/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Setup/XmlPersistor.php
34 строки
803 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2018 Adobe * All Rights Reserved. */ namespace Magento\Framework\Setup; /** * Persist listened schema to db_schema.xml file. */ class XmlPersistor { /** * Persist XML object to file. * * @param \SimpleXMLElement $simpleXMLElement * @param $path */ public function persist(\SimpleXMLElement $simpleXMLElement, $path) { $dom = new \DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true; $dom->loadXML($simpleXMLElement->asXML()); file_put_contents( $path, str_replace( ' xmlns:xsi="xsi"', //replace namespace, as we do not need it for xsi namespace '', $dom->saveXML() ) ); } }