ABVariant.php
27 lines
| 1 | <?php |
| 2 | |
| 3 | namespace FSVendor\WPDesk\ABTesting; |
| 4 | |
| 5 | /** |
| 6 | * Specific variant should know what functionalities should be on/off. |
| 7 | * |
| 8 | * @package WPDesk\ABTesting |
| 9 | */ |
| 10 | interface ABVariant |
| 11 | { |
| 12 | /** |
| 13 | * Checks if a variant does have a given functionality working. |
| 14 | * |
| 15 | * @param string $functionality |
| 16 | * |
| 17 | * @return bool |
| 18 | */ |
| 19 | public function is_on($functionality); |
| 20 | /** |
| 21 | * Returns the variant id (can be numeric). For example for standard AB testing it would be A or B. |
| 22 | * |
| 23 | * @return string |
| 24 | */ |
| 25 | public function get_variant_id(); |
| 26 | } |
| 27 |