[ Index ]

PHP Cross Reference of phpBB-3.3.5-deutsch

title

Body

[close]

/vendor/s9e/regexp-builder/src/Passes/ -> CoalesceOptionalStrings.php (summary)

(no description)

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

Defines 1 class

CoalesceOptionalStrings:: (7 methods):
  canRun()
  runPass()
  buildCoalescedStrings()
  buildPrefix()
  buildSuffix()
  getPrefixGroups()
  isSingleOptionalAlternation()


Class: CoalesceOptionalStrings  - X-Ref

Replaces (?:ab?|b)? with a?b?

canRun(array $strings)   X-Ref
{@inheritdoc}


runPass(array $strings)   X-Ref
{@inheritdoc}


buildCoalescedStrings(array $prefixStrings, array $suffix)   X-Ref
Build the final list of coalesced strings

param: array[] $prefixStrings
param: array   $suffix
return: array[]

buildPrefix(array $strings)   X-Ref
Build the list of strings used as prefix

param: array[] $strings
return: array[]

buildSuffix(array $strings)   X-Ref
Build a list of strings that matches any given strings or nothing

Will unpack groups of single characters

param: array[] $strings
return: array[]

getPrefixGroups(array $strings)   X-Ref
Get the list of potential prefix strings grouped by identical suffix

param: array[] $strings
return: array

isSingleOptionalAlternation(array $strings)   X-Ref
Test whether given list of strings starts with a single optional alternation

param: array $strings
return: bool



Generated: Mon Oct 4 17:42:11 2021 Cross-referenced by PHPXref 0.7.1