Verzeichnisstruktur phpBB-3.3.15
- Veröffentlicht
- 28.08.2024
So funktioniert es
|
Auf das letzte Element klicken. Dies geht jeweils ein Schritt zurück |
Auf das Icon klicken, dies öffnet das Verzeichnis. Nochmal klicken schließt das Verzeichnis. |
|
(Beispiel Datei-Icons)
|
Auf das Icon klicken um den Quellcode anzuzeigen |
NormalizeAttributeNames.php
01 <?php
02
03 /**
04 * @package s9e\TextFormatter
05 * @copyright Copyright (c) 2010-2022 The s9e authors
06 * @license http://www.opensource.org/licenses/mit-license.php The MIT License
07 */
08 namespace s9e\TextFormatter\Configurator\TemplateNormalizations;
09
10 use DOMAttr;
11 use DOMElement;
12
13 class NormalizeAttributeNames extends AbstractNormalization
14 {
15 /**
16 * {@inheritdoc}
17 */
18 protected $queries = [
19 '//@*[name() != translate(name(), "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")]',
20 '//xsl:attribute[not(contains(@name, "{"))][@name != translate(@name, "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz")]'
21 ];
22
23 /**
24 * {@inheritdoc}
25 */
26 protected function normalizeAttribute(DOMAttr $attribute)
27 {
28 $attribute->parentNode->setAttribute($this->lowercase($attribute->localName), $attribute->value);
29 $attribute->parentNode->removeAttributeNode($attribute);
30 }
31
32 /**
33 * {@inheritdoc}
34 */
35 protected function normalizeElement(DOMElement $element)
36 {
37 $element->setAttribute('name', $this->lowercase($element->getAttribute('name')));
38 }
39 }