W3cubDocs

/Symfony 4.1

PhpStringTokenParser

class PhpStringTokenParser

Properties

static protected $replacements

Methods

static string parse(string $str)

Parses a string token.

static string parseEscapeSequences(string $str, string|null $quote)

Parses escape sequences in strings (all string types apart from single quoted).

static string parseDocString(string $startToken, string $str)

Parses a constant doc string.

Details

static string parse(string $str)

Parses a string token.

Parameters

string $str String token content

Return Value

string The parsed string

static string parseEscapeSequences(string $str, string|null $quote)

Parses escape sequences in strings (all string types apart from single quoted).

Parameters

string $str String without quotes
string|null $quote Quote type

Return Value

string String with escape sequences parsed

static string parseDocString(string $startToken, string $str)

Parses a constant doc string.

Parameters

string $startToken Doc string start token content (<<<SMTHG)
string $str String token content

Return Value

string Parsed string

© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Translation/Extractor/PhpStringTokenParser.html