[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

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

(no description)

File Size: 234 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Optimizer:: (12 methods):
  optimize()
  cloneCloseTagElementsIntoSwitch()
  cloneCloseTagElementsOutOfSwitch()
  mergeConsecutiveLiteralOutputElements()
  nextSiblingIsLiteralOutput()
  optimizeCloseTagElements()
  removeCloseTagSiblings()
  removeContentFromVoidElements()
  removeEmptyDefaultCases()
  removeNodes()
  removeRedundantCloseTagElements()
  removeRedundantCloseTagElementsInSwitch()


Class: Optimizer  - X-Ref


optimize(DOMDocument $ir)   X-Ref
Optimize an IR

param: DOMDocument $ir
return: void

cloneCloseTagElementsIntoSwitch()   X-Ref
Clone closeTag elements that follow a switch into said switch

If there's a <closeTag/> right after a <switch/>, clone the <closeTag/> at the end of
the every <case/> that does not end with a <closeTag/>

return: void

cloneCloseTagElementsOutOfSwitch()   X-Ref
Clone closeTag elements from the head of a switch's cases before said switch

If there's a <closeTag/> at the beginning of every <case/>, clone it and insert it
right before the <switch/> unless there's already one

return: void

mergeConsecutiveLiteralOutputElements()   X-Ref
Merge consecutive literal outputs

return: void

nextSiblingIsLiteralOutput(DOMElement $node, $disableOutputEscaping)   X-Ref
Test whether the next sibling of an element is a literal output element with matching escaping

param: DOMElement $node
param: string     $disableOutputEscaping
return: bool

optimizeCloseTagElements()   X-Ref
Optimize closeTags elements

return: void

removeCloseTagSiblings()   X-Ref
Remove redundant closeTag siblings after a switch

If all branches of a switch have a closeTag we can remove any closeTag siblings of the switch

return: void

removeContentFromVoidElements()   X-Ref
Remove content from void elements

For each void element, we find whichever <closeTag/> elements close it and remove everything
after

return: void

removeEmptyDefaultCases()   X-Ref
Remove empty default cases (no test and no descendants)

return: void

removeNodes($query, DOMNode $contextNode = null)   X-Ref
Remove all nodes that match given XPath query

param: string  $query
param: DOMNode $contextNode
return: void

removeRedundantCloseTagElements()   X-Ref
Remove redundant closeTag elements from the tail of a switch's cases

For each <closeTag/> remove duplicate <closeTag/> nodes that are either siblings or
descendants of a sibling

return: void

removeRedundantCloseTagElementsInSwitch()   X-Ref
Remove redundant closeTag elements from the tail of a switch's cases

If there's a <closeTag/> right after a <switch/>, remove all <closeTag/> nodes at the
end of every <case/>

return: void



Generated: Thu Mar 24 21:31:15 2022 Cross-referenced by PHPXref 0.7.1