Method |
Description |
|
__construct ( string $name, Laboratory $laboratory ) |
Create a new experiment. |
|
chance ( integer $chance ) |
Set the execution chance. |
|
control ( callable $callback ) |
Register a control callback. |
|
getChance ( ) : integer |
Get the execution chance. |
|
getControl ( ) : callable |
Fetch the control callback. |
|
getLaboratory ( ) : Laboratory | null |
Retrieve the laboratory instance. |
|
getMatcher ( ) : Scientist\Matchers\Matcher |
Get the matcher for this experiment. |
|
getName ( ) : string |
Fetch the experiment name. |
|
getParams ( ) : array |
Get the experiment parameters. |
|
getTrial ( string $name ) : mixed |
Fetch a trial callback by name. |
|
getTrials ( ) : array |
Fetch an array of trial callbacks. |
|
matcher ( Scientist\Matchers\Matcher $matcher ) |
Set a matcher for this experiment. |
|
report ( ) : Report |
Execute the experiment and return a report. |
|
run ( ) : mixed |
Execute the experiment within the laboratory. |
|
shouldRun ( ) : boolean |
Determine whether an experiment should run based on chance. |
|
trial ( string $name, callable $callback ) |
Register a trial callback. |
|