- Class name: CallableVariation
- Namespace: InnoCraft\Experiments\Variations
- Parent class: InnoCraft\Experiments\Variations\StandardVariation
callable InnoCraft\Experiments\Variations\CallableVariation::getCallable()
Returns a callable if the option was passed.
- Visibility: public
void InnoCraft\Experiments\Variations\VariationInterface::run()
Runs / executes the given variation. Depending on the variation type a different action may be executed.
For example a redirect or calling a callable.
- Visibility: public
- This method is defined by InnoCraft\Experiments\Variations\VariationInterface
mixed InnoCraft\Experiments\Variations\StandardVariation::__construct(array $variation)
- Visibility: public
- This method is defined by InnoCraft\Experiments\Variations\StandardVariation
- $variation array - <p>eg array('name' => 'blueColor', 'percentage' => 50). A name has to be given and can be also an ID, eg "4". Percentage is optional. If given, it defines how much traffic this variation should get. For example defining 50 means, this variation will be activated in 50% of overall experiment activations.</p>
string InnoCraft\Experiments\Variations\VariationInterface::getName()
Get the name of the variation.
- Visibility: public
- This method is defined by InnoCraft\Experiments\Variations\VariationInterface
string InnoCraft\Experiments\Variations\VariationInterface::getPercentage()
Get the percentage allocated to this variation. Only returns a percentage if a fixed percentage was allocated to this variation. If no percentage is allocated, it will use the default percentage of a variation which depends on the number of set variations within an experiment.
- Visibility: public
- This method is defined by InnoCraft\Experiments\Variations\VariationInterface