HumHub Documentation (unofficial)

ArrayLoader
in package
implements LoaderInterface

From-array loader.

Tags
author

Konstantin Kudryashov ever.zet@gmail.com

Table of Contents

Interfaces

LoaderInterface
Loader interface.

Methods

load()  : array<string|int, FeatureNode>
Loads features from provided resource.
supports()  : bool
Checks if current loader supports provided resource.
loadBackgroundHash()  : BackgroundNode
Loads background from provided hash.
loadFeatureHash()  : FeatureNode
Loads feature from provided feature hash.
loadOutlineHash()  : OutlineNode
Loads outline from provided outline hash.
loadPyStringHash()  : PyStringNode
Loads PyString from provided hash.
loadScenarioHash()  : ScenarioNode
Loads scenario from provided scenario hash.
loadStepHash()  : StepNode
Loads step from provided hash.
loadTableHash()  : TableNode
Loads table from provided hash.
examplesAreInArray()  : bool
Checks if examples node is an array
loadStepsHash()  : array<string|int, StepNode>
Loads steps from provided hash.
processExamplesArray()  : array<string|int, mixed>
Processes cases when examples are in the form of array of arrays OR in the form of array of objects

Methods

load()

Loads features from provided resource.

public load(mixed $resource) : array<string|int, FeatureNode>
Parameters
$resource : mixed

Resource to load

Return values
array<string|int, FeatureNode>

supports()

Checks if current loader supports provided resource.

public supports(mixed $resource) : bool
Parameters
$resource : mixed

Resource to load

Return values
bool

loadBackgroundHash()

Loads background from provided hash.

protected loadBackgroundHash(array<string|int, mixed> $hash) : BackgroundNode
Parameters
$hash : array<string|int, mixed>

Background hash

Return values
BackgroundNode

loadFeatureHash()

Loads feature from provided feature hash.

protected loadFeatureHash(array<string|int, mixed> $hash[, int $line = 0 ]) : FeatureNode
Parameters
$hash : array<string|int, mixed>

Feature hash

$line : int = 0
Return values
FeatureNode

loadOutlineHash()

Loads outline from provided outline hash.

protected loadOutlineHash(array<string|int, mixed> $hash[, int $line = 0 ]) : OutlineNode
Parameters
$hash : array<string|int, mixed>

Outline hash

$line : int = 0

Outline definition line

Return values
OutlineNode

loadPyStringHash()

Loads PyString from provided hash.

protected loadPyStringHash(array<string|int, mixed> $hash[, int $line = 0 ]) : PyStringNode
Parameters
$hash : array<string|int, mixed>

PyString hash

$line : int = 0
Return values
PyStringNode

loadScenarioHash()

Loads scenario from provided scenario hash.

protected loadScenarioHash(array<string|int, mixed> $hash[, int $line = 0 ]) : ScenarioNode
Parameters
$hash : array<string|int, mixed>

Scenario hash

$line : int = 0

Scenario definition line

Return values
ScenarioNode

loadStepHash()

Loads step from provided hash.

protected loadStepHash(array<string|int, mixed> $hash[, int $line = 0 ]) : StepNode
Parameters
$hash : array<string|int, mixed>

Step hash

$line : int = 0

Step definition line

Return values
StepNode

loadTableHash()

Loads table from provided hash.

protected loadTableHash(array<string|int, mixed> $hash) : TableNode
Parameters
$hash : array<string|int, mixed>

Table hash

Return values
TableNode

examplesAreInArray()

Checks if examples node is an array

private examplesAreInArray(mixed $exHash) : bool
Parameters
$exHash : mixed

object hash

Return values
bool

loadStepsHash()

Loads steps from provided hash.

private loadStepsHash(array<string|int, mixed> $hash) : array<string|int, StepNode>
Parameters
$hash : array<string|int, mixed>
Return values
array<string|int, StepNode>

processExamplesArray()

Processes cases when examples are in the form of array of arrays OR in the form of array of objects

private processExamplesArray(mixed $exHash, mixed $examplesKeyword, mixed $examples) : array<string|int, mixed>
Parameters
$exHash : mixed

array hash

$examplesKeyword : mixed

string

$examples : mixed

array

Return values
array<string|int, mixed>

        
On this page

Search results