[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 3 /** 4 * @package s9e\TextFormatter 5 * @copyright Copyright (c) 2010-2022 The s9e authors 6 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 7 */ 8 namespace s9e\TextFormatter\Configurator\TemplateChecks; 9 10 use DOMElement; 11 use s9e\TextFormatter\Configurator\Exceptions\UnsafeTemplateException; 12 use s9e\TextFormatter\Configurator\Items\Tag; 13 use s9e\TextFormatter\Configurator\TemplateCheck; 14 15 class DisallowCopy extends TemplateCheck 16 { 17 /** 18 * Check for <xsl:copy/> elements 19 * 20 * @param DOMElement $template <xsl:template/> node 21 * @param Tag $tag Tag this template belongs to 22 * @return void 23 */ 24 public function check(DOMElement $template, Tag $tag) 25 { 26 $nodes = $template->getElementsByTagNameNS(self::XMLNS_XSL, 'copy'); 27 $node = $nodes->item(0); 28 29 if ($node) 30 { 31 throw new UnsafeTemplateException("Cannot assess the safety of an '" . $node->nodeName . "' element", $node); 32 } 33 } 34 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |