ideatic / html-parser
description
Installs: 2 870
Dependents: 1
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=8.1
- ext-ctype: *
- ext-mbstring: *
This package is not auto-updated.
Last update: 2025-03-07 10:52:21 UTC
README
$dom = HTML_Parser::parse($html); foreach ($dom->children as $node) { if ($node instanceof HTML_Parser_Element) { $this->_processNode($node, $html, $path, $getTranslation); } } // Remove i18n attributes if ($getTranslation) { $dom->walk( function ($node) { if ($node instanceof HTML_Parser_Element && $node->hasAttribute('i18n')) { $node->hasAttribute('i18n')->remove(); } } ); } return $dom->render();