Class Scenario_Treatment

Description

Treatment class

Represents an experiment treatment.

  • copyright: Copyright (c) 2010 TK Studios. (http://www.tkstudios.com)
  • license: New BSD License

Located in /Scenario/Treatment.php (line 32)


	
			
Variable Summary
Method Summary
Scenario_Treatment __construct (string $treatment_name, Scenario_Experiment $parent, [int $row_id = null])
string getName ()
int getRowId ()
string getTreatmentName ()
bool isValid ()
void setRowId (int $val)
void setTreatmentName (string $name)
mixed __get (string $name)
Variables
Scenario_Experiment $_parent (line 46)

Experiment that contains this treatment.

  • access: protected
int $_row_id (line 53)

Row ID (usually database related) of this treatment.

  • access: protected
string $_treatment_name (line 39)

Name of the treatment.

  • access: protected
Methods
Constructor __construct (line 62)

Constructs a new Treatment object.

  • access: public
Scenario_Treatment __construct (string $treatment_name, Scenario_Experiment $parent, [int $row_id = null])
  • string $treatment_name: Name of the treatment. If null, defaults to 50/50 chance between "default" and "alternate".
  • Scenario_Experiment $parent: Experiment that contains this treatment.
  • int $row_id: (Optional) Database row ID
finish (line 163)

Sets an identity/treatment combo for this treatment to "complete" (or "converted")

  • access: public
void finish (Scenario_Identity $id)
getCore (line 185)

Get a safe reference to the core.

  • todo: Pass a reference in upon construction rather than using the singleton.
  • access: public
Scenario_Core getCore ()
getExperiment (line 140)

Get the parent experiment for this treatment.

  • return: The experiment that contains this treatment.
  • access: public
Scenario_Experiment getExperiment ()
getName (line 122)

Get the treatment name. Short form for use via __get("name")

  • return: Name of the treatment
  • access: public
string getName ()
getRowId (line 77)

Gets the stored Row ID (db related)

  • access: public
int getRowId ()
getTreatmentName (line 113)

Gets the name of the treatment.

  • access: public
string getTreatmentName ()
isValid (line 174)

Check to see if the treatment object is complete & safe for use in other operations.

  • return: Validity of the treatment object.
  • access: public
bool isValid ()
setExperiment (line 131)

Set the parent experiment for this treatment.

  • access: public
void setExperiment (Scenario_Experiment $parent)
setRowId (line 86)

Sets the stored Row ID

  • access: public
void setRowId (int $val)
  • int $val
setTreatmentName (line 100)

Sets the name of the treatment.

  • access: public
void setTreatmentName (string $name)
  • string $name
__get (line 150)

Magic getter

  • access: public
mixed __get (string $name)
  • string $name

Documentation generated on Sat, 23 Oct 2010 18:10:49 -0400 by phpDocumentor 1.4.3