[ Index ]

PHP Cross Reference of phpBB-3.3.2-deutsch




/vendor/s9e/text-formatter/src/Configurator/RendererGenerators/PHP/ -> Quick.php (summary)

(no description)

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

Defines 1 class

Quick:: (12 methods):

Class: Quick  - X-Ref

getSource(array $compiledTemplates)   X-Ref
Generate the Quick renderer's source

param: array  $compiledTemplates Array of tagName => compiled template
return: string

export(array $arr)   X-Ref
Export an array as PHP

param: array  $arr
return: string

getRenderingStrategy($php)   X-Ref
Compute the rendering strategy for a compiled template

param: string  $php Template compiled for the PHP renderer
return: array[]      An array containing 0 to 2 pairs of [<rendering type>, <replacement>]

getQuickRendering($php)   X-Ref
Generate the code for rendering a compiled template with the Quick renderer

Parse and record every code path that contains a passthrough. Parse every if-else structure.
When the whole structure is parsed, there are 2 possible situations:
- no code path contains a passthrough, in which case we discard the data
- all the code paths including the mandatory "else" branch contain a passthrough, in which
case we keep the data

param: string     $php Template compiled for the PHP renderer
return: string[]        An array containing one or two strings of PHP, or an empty array

convertPHP(&$head, &$tail, $passthrough)   X-Ref
Convert the two sides of a compiled template to quick rendering

param: string &$head
param: string &$tail
param: bool    $passthrough
return: void

replacePHP(&$php)   X-Ref
No description

buildPHP(array $branches)   X-Ref
Build the source for the two sides of a templates based on the structure extracted from its
original source

param: array    $branches
return: string[]

getBranchesPassthrough(array $branches)   X-Ref
Get the unique values for the "passthrough" key of given branches

param: array     $branches
return: integer[]

getDynamicRendering($php)   X-Ref
Get a string suitable as a preg_replace() replacement for given PHP code

param: string     $php Original code
return: array|bool      Array of [regexp, replacement] if possible, or FALSE otherwise

getStaticRendering($php)   X-Ref
Get a string suitable as a str_replace() replacement for given PHP code

param: string      $php Original code
return: bool|string      Static replacement if possible, or FALSE otherwise

getStringRenderings($php)   X-Ref
Get string rendering strategies for given chunks

param: string $php
return: array

replacePlaceholder(&$str, $uniqid, $index)   X-Ref
Replace all instances of a uniqid with a PCRE replacement in a string

param: string  &$str    PCRE replacement
param: string   $uniqid Unique ID
param: integer  $index  Capture index
return: void

Generated: Wed Nov 11 20:28:18 2020 Cross-referenced by PHPXref 0.7.1