Created
May 2, 2016 19:41
-
-
Save pachico/6501a3d7df70609c16cfa1605997de26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PhpAb\Engine\Engine | |
=============== | |
The engine used to start tests. | |
* Class name: Engine | |
* Namespace: PhpAb\Engine | |
* This class implements: [PhpAb\Engine\EngineInterface](PhpAb-Engine-EngineInterface.md) | |
Properties | |
---------- | |
### $tests | |
public array<mixed,\PhpAb\Test\Bag> $tests = array() | |
A list with test bags. | |
* Visibility: **public** | |
### $participationManager | |
private \PhpAb\Participation\ManagerInterface $participationManager | |
The participation manager used to check if a user particiaptes. | |
* Visibility: **private** | |
### $dispatcher | |
private \PhpAb\Event\DispatcherInterface $dispatcher | |
The event dispatcher that dispatches events related to tests. | |
* Visibility: **private** | |
### $filter | |
private \PhpAb\Participation\Filter\FilterInterface $filter | |
The default filter that is used when a test bag has no filter set. | |
* Visibility: **private** | |
### $chooser | |
private \PhpAb\Variant\Chooser\ChooserInterface $chooser | |
The default variant chooser that is used when a test bag has no variant chooser set. | |
* Visibility: **private** | |
### $locked | |
private boolean $locked = false | |
Locks the engine for further manipulaton | |
* Visibility: **private** | |
Methods | |
------- | |
### __construct | |
mixed PhpAb\Engine\Engine::__construct(\PhpAb\Participation\ManagerInterface $participationManager, \PhpAb\Event\DispatcherInterface $dispatcher, \PhpAb\Participation\Filter\FilterInterface|null $filter, \PhpAb\Variant\Chooser\ChooserInterface|null $chooser) | |
Initializes a new instance of this class. | |
* Visibility: **public** | |
#### Arguments | |
* $participationManager **[PhpAb\Participation\ManagerInterface](PhpAb-Participation-ManagerInterface.md)** - <p>Handles the Participation state</p> | |
* $dispatcher **[PhpAb\Event\DispatcherInterface](PhpAb-Event-DispatcherInterface.md)** - <p>Dispatches events</p> | |
* $filter **[PhpAb\Participation\Filter\FilterInterface](PhpAb-Participation-Filter-FilterInterface.md)|null** - <p>The default filter to use if no filter is provided for the test.</p> | |
* $chooser **[PhpAb\Variant\Chooser\ChooserInterface](PhpAb-Variant-Chooser-ChooserInterface.md)|null** - <p>The default chooser to use if no chooser is provided for the test.</p> | |
### getTests | |
array<mixed,\PhpAb\Test\TestInterface>|array PhpAb\Engine\EngineInterface::getTests() | |
Get all tests for the engine | |
* Visibility: **public** | |
* This method is defined by [PhpAb\Engine\EngineInterface](PhpAb-Engine-EngineInterface.md) | |
### getTest | |
\PhpAb\Test\TestInterface PhpAb\Engine\EngineInterface::getTest(string $test) | |
Get a test from the engine | |
* Visibility: **public** | |
* This method is defined by [PhpAb\Engine\EngineInterface](PhpAb-Engine-EngineInterface.md) | |
#### Arguments | |
* $test **string** - <p>The identifier of the test</p> | |
### addTest | |
mixed PhpAb\Engine\EngineInterface::addTest(\PhpAb\Test\TestInterface $test, array $options, \PhpAb\Participation\Filter\FilterInterface $filter, \PhpAb\Variant\Chooser\ChooserInterface $chooser) | |
Adds a test to the Engine | |
* Visibility: **public** | |
* This method is defined by [PhpAb\Engine\EngineInterface](PhpAb-Engine-EngineInterface.md) | |
#### Arguments | |
* $test **[PhpAb\Test\TestInterface](PhpAb-Test-TestInterface.md)** | |
* $options **array** | |
* $filter **[PhpAb\Participation\Filter\FilterInterface](PhpAb-Participation-Filter-FilterInterface.md)** | |
* $chooser **[PhpAb\Variant\Chooser\ChooserInterface](PhpAb-Variant-Chooser-ChooserInterface.md)** | |
### start | |
null PhpAb\Engine\EngineInterface::start() | |
Starts the tests | |
* Visibility: **public** | |
* This method is defined by [PhpAb\Engine\EngineInterface](PhpAb-Engine-EngineInterface.md) | |
### handleTestBag | |
boolean PhpAb\Engine\Engine::handleTestBag(\PhpAb\Test\Bag $bag) | |
Process the test bag | |
* Visibility: **private** | |
#### Arguments | |
* $bag **[PhpAb\Test\Bag](PhpAb-Test-Bag.md)** | |
### activateVariant | |
mixed PhpAb\Engine\Engine::activateVariant(\PhpAb\Test\Bag $bag, \PhpAb\Variant\VariantInterface $variant) | |
* Visibility: **private** | |
#### Arguments | |
* $bag **[PhpAb\Test\Bag](PhpAb-Test-Bag.md)** | |
* $variant **[PhpAb\Variant\VariantInterface](PhpAb-Variant-VariantInterface.md)** | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment