Copied!
Cloneable Instantiable
Constants
public PhpParser\ParserFactory ::ONLY_PHP5 = 4
public PhpParser\ParserFactory ::ONLY_PHP7 = 3
public PhpParser\ParserFactory ::PREFER_PHP5 = 2
public PhpParser\ParserFactory ::PREFER_PHP7 = 1
Methods
public create ( int $kind , ? PhpParser\Lexer $lexer = NULL , array $parserOptions = [ ] ) : PhpParser\Parser
 

Creates a Parser instance, according to the provided kind.

  • param int $kind One of ::PREFER_PHP7, ::PREFER_PHP5, ::ONLY_PHP7 or ::ONLY_PHP5
  • param PhpParser\Lexer | null $lexer Lexer to use. Defaults to emulative lexer when not specified
  • param array $parserOptions Parser options. See ParserAbstract::__construct() argument
  • return PhpParser\Parser The parser instance
© 2022 Bruce Wells
Search Namespaces \ Classes
Configuration