KeywordsDumper
in package
Gherkin keywords dumper.
Tags
Table of Contents
Properties
- $keywords : mixed
- $keywordsDumper : mixed
Methods
- __construct() : mixed
- Initializes dumper.
- dump() : string|array<string|int, mixed>
- Dumps keyworded feature into string.
- dumpKeywords() : string
- Defaults keywords dumper.
- setKeywordsDumperFunction() : mixed
- Sets keywords mapper function.
- dumpBackground() : string
- Dumps background example.
- dumpFeature() : string
- Dumps feature example.
- dumpOutline() : string
- Dumps outline example.
- dumpScenario() : string
- Dumps scenario example.
- dumpStep() : string
- Dumps step example.
Properties
$keywords
private
mixed
$keywords
$keywordsDumper
private
mixed
$keywordsDumper
Methods
__construct()
Initializes dumper.
public
__construct(KeywordsInterface $keywords) : mixed
Parameters
- $keywords : KeywordsInterface
-
Keywords instance
dump()
Dumps keyworded feature into string.
public
dump(string $language[, bool $short = true ][, bool $excludeAsterisk = false ]) : string|array<string|int, mixed>
Parameters
- $language : string
-
Keywords language
- $short : bool = true
-
Dump short version
- $excludeAsterisk : bool = false
Return values
string|array<string|int, mixed> —String for short version and array of features for extended
dumpKeywords()
Defaults keywords dumper.
public
dumpKeywords(array<string|int, mixed> $keywords, bool $isShort) : string
Parameters
- $keywords : array<string|int, mixed>
-
Keywords list
- $isShort : bool
-
Is short version
Return values
stringsetKeywordsDumperFunction()
Sets keywords mapper function.
public
setKeywordsDumperFunction(callable $mapper) : mixed
Callable should accept 2 arguments (array $keywords and bool $isShort)
Parameters
- $mapper : callable
-
Mapper function
dumpBackground()
Dumps background example.
protected
dumpBackground(string $keyword[, bool $short = true ][, mixed $excludeAsterisk = false ]) : string
Parameters
- $keyword : string
-
Item keyword
- $short : bool = true
-
Dump short version?
- $excludeAsterisk : mixed = false
Return values
stringdumpFeature()
Dumps feature example.
protected
dumpFeature(string $keyword[, bool $short = true ][, mixed $excludeAsterisk = false ]) : string
Parameters
- $keyword : string
-
Item keyword
- $short : bool = true
-
Dump short version?
- $excludeAsterisk : mixed = false
Return values
stringdumpOutline()
Dumps outline example.
protected
dumpOutline(string $keyword[, bool $short = true ][, mixed $excludeAsterisk = false ]) : string
Parameters
- $keyword : string
-
Item keyword
- $short : bool = true
-
Dump short version?
- $excludeAsterisk : mixed = false
Return values
stringdumpScenario()
Dumps scenario example.
protected
dumpScenario(string $keyword[, bool $short = true ][, mixed $excludeAsterisk = false ]) : string
Parameters
- $keyword : string
-
Item keyword
- $short : bool = true
-
Dump short version?
- $excludeAsterisk : mixed = false
Return values
stringdumpStep()
Dumps step example.
protected
dumpStep(string $keywords, string $text[, bool $short = true ][, mixed $excludeAsterisk = false ]) : string
Parameters
- $keywords : string
-
Item keyword
- $text : string
-
Step text
- $short : bool = true
-
Dump short version?
- $excludeAsterisk : mixed = false