[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Configurator/Helpers/ -> TemplateHelper.php (summary)

(no description)

Copyright: Copyright (c) 2010-2022 The s9e authors
License: http://www.opensource.org/licenses/mit-license.php The MIT License
File Size: 200 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 4 functions

  getParametersFromXSL()
  highlightNode()
  replaceHomogeneousTemplates()
  getParametersFromExpression()

Functions
Functions that are not part of a class:

getParametersFromXSL($xsl)   X-Ref
Return a list of parameters in use in given XSL

param: string $xsl XSL source
return: array       Alphabetically sorted list of unique parameter names

highlightNode(DOMNode $node, $prepend, $append)   X-Ref
Highlight the source of a node inside of a template

param: DOMNode $node    Node to highlight
param: string  $prepend HTML to prepend
param: string  $append  HTML to append
return: string           Template's source, as HTML

replaceHomogeneousTemplates(array &$templates, $minCount = 3)   X-Ref
Replace simple templates (in an array, in-place) with a common template

In some situations, renderers can take advantage of multiple tags having the same template. In
any configuration, there's almost always a number of "simple" tags that are rendered as an
HTML element of the same name with no HTML attributes. For instance, the system tag "p" used
for paragraphs, "B" tags used for "b" HTML elements, etc... This method replaces those
templates with a common template that uses a dynamic element name based on the tag's name,
either its nodeName or localName depending on whether the tag is namespaced, and normalized to
lowercase using XPath's translate() function

param: array<string> &$templates Associative array of [tagName => template]
param: integer       $minCount
return: void

getParametersFromExpression(DOMNode $node, $expr)   X-Ref
Get a list of parameters from given XPath expression

param: DOMNode  $node Context node
param: string   $expr XPath expression
return: string[]



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1