1 | <?php |
||
14 | class WebSnippet |
||
15 | { |
||
16 | /** |
||
17 | * Enables the option to force yourself into a specific Variation on any page |
||
18 | * @var boolean |
||
19 | */ |
||
20 | private $enableForceVariation; |
||
21 | |||
22 | /** |
||
23 | * Set to true to remove paused and draft experiments from the snippet |
||
24 | * @var boolean |
||
25 | */ |
||
26 | private $excludeDisabledExperiments; |
||
27 | |||
28 | /** |
||
29 | * Set to true to mask descriptive names |
||
30 | * @var boolean |
||
31 | */ |
||
32 | private $excludeNames; |
||
33 | |||
34 | /** |
||
35 | * Set to true to include jQuery in your snippet. |
||
36 | * @var boolean |
||
37 | */ |
||
38 | private $includeJquery; |
||
39 | |||
40 | /** |
||
41 | * Set to true to change the last octet of IP addresses to 0 prior to logging |
||
42 | * @var boolean |
||
43 | */ |
||
44 | private $ipAnonymization; |
||
45 | |||
46 | /** |
||
47 | * A regular expression (max 1500 characters) matching ip addresses for |
||
48 | * filtering out visitors. Matching visitors will still see the experiments, |
||
49 | * but they won't be counted in results. |
||
50 | * @var string |
||
51 | */ |
||
52 | private $ipFilter; |
||
53 | |||
54 | /** |
||
55 | * The prefered jQuery library version you would like to use with your snippet. |
||
56 | * If you do not want to include jQuery, set include_jquery to false. Can be |
||
57 | * 'jquery-1.11.3-trim', 'jquery-1.11.3-full', 'jquery-1.6.4-trim', 'jquery-1.6.4-full' |
||
58 | * or 'none'. |
||
59 | * @var string |
||
60 | */ |
||
61 | private $library; |
||
62 | |||
63 | /** |
||
64 | * The javascript code which runs before Optimizely on all pages, regardless |
||
65 | * of whether or not there is a running experiment. |
||
66 | * @var string |
||
67 | */ |
||
68 | private $projectJavascript; |
||
69 | |||
70 | /** |
||
71 | * The current revision number of the project snippet |
||
72 | * @var integer |
||
73 | */ |
||
74 | private $codeRevision; |
||
75 | |||
76 | /** |
||
77 | * The current size in bytes of the project snippet |
||
78 | * @var integer |
||
79 | */ |
||
80 | private $jsFileSize; |
||
81 | |||
82 | |||
83 | /** |
||
84 | * Constructor. |
||
85 | */ |
||
86 | 7 | public function __construct($options = array()) |
|
105 | |||
106 | /** |
||
107 | * Returns this object as array. |
||
108 | */ |
||
109 | 3 | public function toArray() |
|
133 | |||
134 | 1 | public function getEnableForceVariation() |
|
138 | |||
139 | 7 | public function setEnableForceVariation($enableForceVariation) |
|
143 | |||
144 | 2 | public function getExcludeDisabledExperiments() |
|
148 | |||
149 | 7 | public function setExcludeDisabledExperiments($excludeDisabledExperiments) |
|
153 | |||
154 | 1 | public function getExcludeNames() |
|
158 | |||
159 | 7 | public function setExcludeNames($excludeNames) |
|
163 | |||
164 | 1 | public function getIncludeJquery() |
|
168 | |||
169 | 7 | public function setIncludeJquery($includeJquery) |
|
173 | |||
174 | 1 | public function getIpAnonymization() |
|
178 | |||
179 | 7 | public function setIpAnonymization($ipAnonymization) |
|
183 | |||
184 | 2 | public function getIpFilter() |
|
188 | |||
189 | 7 | public function setIpFilter($ipFilter) |
|
193 | |||
194 | 1 | public function getLibrary() |
|
198 | |||
199 | 7 | public function setLibrary($library) |
|
203 | |||
204 | 1 | public function getProjectJavascript() |
|
208 | |||
209 | 7 | public function setProjectJavascript($projectJavascript) |
|
213 | |||
214 | 1 | public function getCodeRevision() |
|
218 | |||
219 | 7 | public function setCodeRevision($codeRevision) |
|
223 | |||
224 | 1 | public function getJsFileSize() |
|
228 | |||
229 | 7 | public function setJsFileSize($jsFileSize) |
|
233 | } |
||
234 | |||
242 |