PHP Класс PhpParser\Parser\Multiple

Наследование: implements PhpParser\Parser
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( array $parsers ) Create a parser which will try multiple parsers in an order of preference.
parse ( $code, PhpParser\ErrorHandler $errorHandler = null )

Приватные методы

Метод Описание
tryParse ( PhpParser\Parser $parser, PhpParser\ErrorHandler $errorHandler, $code )

Описание методов

__construct() публичный Метод

Parsers will be invoked in the order they're provided to the constructor. If one of the parsers runs without throwing, it's output is returned. Otherwise the exception that the first parser generated is thrown.
public __construct ( array $parsers )
$parsers array

parse() публичный Метод

public parse ( $code, PhpParser\ErrorHandler $errorHandler = null )
$errorHandler PhpParser\ErrorHandler