ParserFactory
in package
Table of Contents
- ONLY_PHP5 = 4
- ONLY_PHP7 = 3
- PREFER_PHP5 = 2
- PREFER_PHP7 = 1
- create() : Parser
- Creates a Parser instance, according to the provided kind.
Constants
ONLY_PHP5
public
mixed
ONLY_PHP5
= 4
ONLY_PHP7
public
mixed
ONLY_PHP7
= 3
PREFER_PHP5
public
mixed
PREFER_PHP5
= 2
PREFER_PHP7
public
mixed
PREFER_PHP7
= 1
Methods
create()
Creates a Parser instance, according to the provided kind.
public
create(int $kind[, Lexer|null $lexer = null ][, array<string|int, mixed> $parserOptions = [] ]) : Parser
Parameters
- $kind : int
-
One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5
- $lexer : Lexer|null = null
-
Lexer to use. Defaults to emulative lexer when not specified
- $parserOptions : array<string|int, mixed> = []
-
Parser options. See ParserAbstract::__construct() argument
Return values
Parser —The parser instance