[ Index ]

PHP Cross Reference of phpBB-3.3.7-deutsch

title

Body

[close]

/vendor/s9e/text-formatter/src/Plugins/Preg/ -> Configurator.php (summary)

(no description)

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

Defines 1 class

Configurator:: (14 methods):
  asConfig()
  getJSHints()
  match()
  replace()
  addAttribute()
  convertTemplate()
  createTag()
  fixUnnamedCaptures()
  getPassthroughCapture()
  getRegexpInfo()
  isCatchAll()
  parseRegexp()
  parseTemplate()
  removeUnknownReferences()


Class: Configurator  - X-Ref


asConfig()   X-Ref
{@inheritdoc}


getJSHints()   X-Ref
{@inheritdoc}


match($regexp, $tagName)   X-Ref
Configure a pattern-based match

param: string $regexp   Regexp to be used by the parser
param: string $tagName  Name of the tag that holds the matched text
return: void

replace($regexp, $template, $tagName = null)   X-Ref
Configure a pattern-based replacement

param: string $regexp   Regexp to be used by the parser
param: string $template Template to be used for rendering
param: string $tagName  Name of the tag to create. A name based on the regexp is
return: Tag              The tag created to represent this replacement

addAttribute(Tag $tag, $attrName)   X-Ref
Add given attribute to given tag based on parsed captures

param: Tag    $tag
param: string $attrName
return: void

convertTemplate($template, $passthroughIdx)   X-Ref
Convert a preg-style replacement to a template

param: string  $template       Original template
param: integer $passthroughIdx Index of the passthrough capture
return: string                  Modified template

createTag($tagName, $template)   X-Ref
No description

fixUnnamedCaptures($regexp)   X-Ref
Give a name to unnamed captures that are referenced in current replacement

param: string $regexp Original regexp
return: string         Modified regexp

getPassthroughCapture()   X-Ref
Get the index of the capture used for passthrough in current replacement

return: integer

getRegexpInfo($regexp)   X-Ref
Parse a regexp and return its info

param: string $regexp
return: array

isCatchAll($expr)   X-Ref
Test whether given expression is a catch-all expression such as .*?

param: string $expr Subpattern
return: bool

parseRegexp($regexp)   X-Ref
Parse given regexp and store its information

param: string  $regexp
return: void

parseTemplate($template)   X-Ref
Parse given template and store the references it contains

param: string $template
return: void

removeUnknownReferences()   X-Ref
Remove references that do not correspond to an existing capture

return: void



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