[ Index ]

PHP Cross Reference of phpBB-3.3.14-deutsch

title

Body

[close]

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

(no description)

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

Defines 1 class

Serializer:: (15 methods):
  __construct()
  serializeStrings()
  analyzeStrings()
  getChars()
  getRanges()
  isChar()
  isQuantifiable()
  isSingleQuantifiableString()
  needsParentheses()
  serializeCharacterClass()
  serializeCharacterClassUnit()
  serializeElement()
  serializeLiteral()
  serializeString()
  serializeValue()


Class: Serializer  - X-Ref


__construct(OutputInterface $output, MetaCharacters $meta, Escaper $escaper)   X-Ref

param: OutputInterface $output
param: Escaper         $escaper

serializeStrings(array $strings)   X-Ref
Serialize given strings into a regular expression

param: array[] $strings
return: string

analyzeStrings(array $strings)   X-Ref
Analyze given strings to determine how to serialize them

The returned array may contains any of the following elements:

- (string) quantifier Either '' or '?'
- (array)  chars      List of values from single-char strings
- (array)  strings    List of multi-char strings

param: array[] $strings
return: array

getChars(array $strings)   X-Ref
Return the portion of strings that are composed of a single character

param: array<int, array> $strings
return: array<int, int>            String key => value

getRanges(array $values)   X-Ref
Get the list of ranges that cover all given values

param: integer[] $values Ordered list of values
return: array[]           List of ranges in the form [start, end]

isChar(array $string)   X-Ref
Test whether given string represents a single character

param: array $string
return: bool

isQuantifiable(array $info)   X-Ref
Test whether an expression is quantifiable based on the strings info

param: array $info
return: bool

isSingleQuantifiableString(array $strings)   X-Ref
Test whether a list of strings contains only one single quantifiable string

param: array[] $strings
return: bool

needsParentheses(array $info)   X-Ref
Test whether an expression needs parentheses based on the strings info

param: array $info
return: bool

serializeCharacterClass(array $values)   X-Ref
Serialize a given list of values into a character class

param: integer[] $values
return: string

serializeCharacterClassUnit(int $value)   X-Ref
Serialize a given value to be used in a character class

param: integer $value
return: string

serializeElement($element)   X-Ref
Serialize an element from a string

param: array|integer $element
return: string

serializeLiteral(int $value)   X-Ref
Serialize a given value to be used as a literal

param: integer $value
return: string

serializeString(array $string)   X-Ref
Serialize a given string into a regular expression

param: array  $string
return: string

serializeValue(int $value, string $escapeMethod)   X-Ref
Serialize a given value

param: integer $value
param: string  $escapeMethod
return: string



Generated: Mon Nov 25 19:05:08 2024 Cross-referenced by PHPXref 0.7.1