ContextGenerator
class ContextGenerator (View source)
Used for context generation.
Constants
TEMPLATE |
The template of a context. Parameters: 1 - name 2 - class 3 - link 4 - keywords array |
Properties
static array<string,int> | $labelsFlags | Labels and flags that may be used when defining keywords. |
|
static array<string,string> | $links | Documentation links for each context. |
Methods
Sorts an array of words.
Reads a list of words and sorts it by type, length and keyword.
Prints an array of a words in PHP format.
Generates a context's class.
Formats context name.
Builds a test.
Generates recursively all tests preserving the directory structure.
Details
static array
sortWords(array $arr)
Sorts an array of words.
static array
readWords(array $files)
Reads a list of words and sorts it by type, length and keyword.
static string
printWords(array $words)
Prints an array of a words in PHP format.
static string
generate(array $options)
Generates a context's class.
static string
formatName(string $name)
Formats context name.
static void
build(string $input, string $output)
Builds a test.
Reads the input file, generates the data and writes it back.
static void
buildAll(string $input, string $output)
Generates recursively all tests preserving the directory structure.