GherkinFileLoader
extends AbstractFileLoader
in package
Gherkin *.feature files loader.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- Initializes loader.
- load() : array<string|int, FeatureNode>
- Loads features from provided resource.
- setBasePath() : mixed
- Sets base features path.
- setCache() : mixed
- Sets cache layer.
- supports() : bool
- Checks if current loader supports provided resource.
- findAbsolutePath() : string
- Finds absolute path for provided relative (relative to base features path).
- findRelativePath() : string
- Finds relative path for provided absolute (relative to base features path).
- parseFeature() : FeatureNode
- Parses feature at provided absolute path.
Properties
$basePath
protected
mixed
$basePath
$cache
protected
mixed
$cache
$parser
protected
mixed
$parser
Methods
__construct()
Initializes loader.
public
__construct(Parser $parser[, CacheInterface $cache = null ]) : mixed
Parameters
- $parser : Parser
-
Parser
- $cache : CacheInterface = null
-
Cache layer
load()
Loads features from provided resource.
public
load(string $path) : array<string|int, FeatureNode>
Parameters
- $path : string
-
Resource to load
Return values
array<string|int, FeatureNode>setBasePath()
Sets base features path.
public
setBasePath(string $path) : mixed
Parameters
- $path : string
-
Base loader path
setCache()
Sets cache layer.
public
setCache(CacheInterface $cache) : mixed
Parameters
- $cache : CacheInterface
-
Cache layer
supports()
Checks if current loader supports provided resource.
public
supports(mixed $path) : bool
Parameters
- $path : mixed
-
Resource to load
Return values
boolfindAbsolutePath()
Finds absolute path for provided relative (relative to base features path).
protected
findAbsolutePath(string $path) : string
Parameters
- $path : string
-
Relative path
Return values
stringfindRelativePath()
Finds relative path for provided absolute (relative to base features path).
protected
findRelativePath(string $path) : string
Parameters
- $path : string
-
Absolute path
Return values
stringparseFeature()
Parses feature at provided absolute path.
protected
parseFeature(string $path) : FeatureNode
Parameters
- $path : string
-
Feature path