[ Index ] |
PHP Cross Reference of phpBB-3.3.14-deutsch |
[Source view] [Print] [Project Stats]
(no description)
Copyright: | Copyright (c) 2010-2022 The s9e authors |
License: | http://www.opensource.org/licenses/mit-license.php The MIT License |
File Size: | 164 lines (5 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
replaceTokens($template, $regexp, $fn) X-Ref |
Replace parts of a template that match given regexp Treats attribute values as plain text. Replacements within XPath expression is unsupported. The callback must return an array with two elements. The first must be either of 'expression', 'literal' or 'passthrough', and the second element depends on the first. - 'expression' indicates that the replacement must be treated as an XPath expression such as '@foo', which must be passed as the second element. - 'literal' indicates a literal (plain text) replacement, passed as its second element. - 'passthrough' indicates that the replacement should the tag's content. It works differently whether it is inside an attribute's value or a text node. Within an attribute's value, the replacement will be the text content of the tag. Within a text node, the replacement becomes an <xsl:apply-templates/> node. A second optional argument can be passed to be used as its @select node-set. param: string $template Original template param: string $regexp Regexp for matching parts that need replacement param: callable $fn Callback used to get the replacement return: string Processed template |
createReplacementNode(DOMDocument $dom, array $replacement) X-Ref |
Create a node that implements given replacement strategy param: DOMDocument $dom param: array $replacement return: DOMNode |
replaceTokensInAttribute(DOMAttr $attribute, $regexp, $fn) X-Ref |
Replace parts of an attribute that match given regexp param: DOMAttr $attribute Attribute param: string $regexp Regexp for matching parts that need replacement param: callable $fn Callback used to get the replacement return: void |
replaceTokensInText(DOMText $node, $regexp, $fn) X-Ref |
No description |
Generated: Mon Nov 25 19:05:08 2024 | Cross-referenced by PHPXref 0.7.1 |