PHP Class SqlParser\Tools\ContextGenerator

Author: Dan Ungureanu ([email protected])
Afficher le fichier Open project: phpmyadmin/sql-parser

Méthodes publiques

Свойство Type Description
$LABELS_FLAGS array Labels and flags that may be used when defining keywords.
$LINKS array Documentation links for each context.

Méthodes publiques

Méthode Description
build ( string $input, string $output ) : void Builds a test.
buildAll ( string $input, string $output ) : void Generates recursively all tests preserving the directory structure.
generate ( array $options ) : string Generates a context's class.
printWords ( array $words, integer $spaces = 8, integer $line = 80 ) : string Prints an array of a words in PHP format.
readWords ( array $files ) : array Reads a list of words and sorts it by type, length and keyword.
sortWords ( array &$arr ) : array Sorts an array of words.

Method Details

build() public static méthode

Reads the input file, generates the data and writes it back.
public static build ( string $input, string $output ) : void
$input string The input file.
$output string The output directory.
Résultat void

buildAll() public static méthode

Generates recursively all tests preserving the directory structure.
public static buildAll ( string $input, string $output ) : void
$input string The input directory.
$output string The output directory.
Résultat void

generate() public static méthode

Generates a context's class.
public static generate ( array $options ) : string
$options array The options that are used in generating this context.
Résultat string

printWords() public static méthode

Prints an array of a words in PHP format.
public static printWords ( array $words, integer $spaces = 8, integer $line = 80 ) : string
$words array The list of words to be formatted.
$spaces integer The number of spaces that starts every line.
$line integer The length of a line.
Résultat string

readWords() public static méthode

Reads a list of words and sorts it by type, length and keyword.
public static readWords ( array $files ) : array
$files array
Résultat array

sortWords() public static méthode

Sorts an array of words.
public static sortWords ( array &$arr ) : array
$arr array
Résultat array

Property Details

$LABELS_FLAGS public_oe static_oe property

Labels and flags that may be used when defining keywords.
public static array $LABELS_FLAGS
Résultat array