PHP Класс SqlParser\Tools\TestGenerator

Показать файл Открыть проект Примеры использования класса

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

Метод Описание
build ( string $type, string $input, string $output, string $debug = null ) : void Builds a test.
buildAll ( string $input, string $output, $debug = null ) : void Generates recursively all tests preserving the directory structure.
generate ( string $query, string $type = 'parser' ) : array Generates a test's data.

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

build() публичный статический Метод

Reads the input file, generates the data and writes it back.
public static build ( string $type, string $input, string $output, string $debug = null ) : void
$type string The type of this test.
$input string The input file.
$output string The output file.
$debug string The debug file.
Результат void

buildAll() публичный статический Метод

Generates recursively all tests preserving the directory structure.
public static buildAll ( string $input, string $output, $debug = null ) : void
$input string The input directory.
$output string The output directory.
Результат void

generate() публичный статический Метод

Generates a test's data.
public static generate ( string $query, string $type = 'parser' ) : array
$query string The query to be analyzed.
$type string Test's type (may be `lexer` or `parser`).
Результат array