Core class
Base Scenario class, singleton pattern for easy access to the library's functionality.
Located in /Scenario/Core.php (line 32)
| Class | Description |
|---|---|
| Scenario | Core subclass |
Holds the default configuration data, to be selectively overwritten by config method.
Holds the singleton instance.
Data adapter to handle storage & retrieval of testing data.
Configuration data.
Marks a treatment as being completed.
Gets the experiment for the specified name.
Example:
Accesses the Core singleton instance
Calls and returns default Scenario_Identity object from generator.
Shortcut for one-line A/B testing.
Example:
Render the results of an experiment.
Example:
Static method for getting a treatment for a given experiment.
Short form usage example:
Constructor. This is usually handled by the singleton pattern, constructing a core outside of that pattern will cause errors on many calls.
Set configuration options.
Merges the given options array into the configuration data.
Usage example for Zend adapter:
Usage example for Pdo adapter:
Retrieve an experiment by name.
Gets an experiement by the specified name, first checking for the existence of a class in the format [classPrefix].ucfirst(name), and defaulting to Scenario_Experiment if unable to find a custom class. Custom classes may be used to alter the behavior of experiments, particularly in regards to treatment selection.
Retrieve a specific value from the configuration array.
Retrieves a specific value, sub-arrays delimited by periods. _config['test']['othertest'] may be referenced by
Retrieves a treatment from an experiment,
Set the data adapter.
Sets the data adapter in use by this instance and links the adapter back to this instance.
Documentation generated on Sat, 23 Oct 2010 18:10:45 -0400 by phpDocumentor 1.4.3