1 | <?php |
||
12 | class WebSnippet |
||
13 | { |
||
14 | /** |
||
15 | * Enables the option to force yourself into a specific Variation on any page |
||
16 | * @var boolean |
||
17 | */ |
||
18 | private $enableForceVariation; |
||
19 | |||
20 | /** |
||
21 | * Set to true to remove paused and draft experiments from the snippet |
||
22 | * @var boolean |
||
23 | */ |
||
24 | private $excludeDisabledExperiments; |
||
25 | |||
26 | /** |
||
27 | * Set to true to mask descriptive names |
||
28 | * @var boolean |
||
29 | */ |
||
30 | private $excludeNames; |
||
31 | |||
32 | /** |
||
33 | * Set to true to include jQuery in your snippet. |
||
34 | * @var boolean |
||
35 | */ |
||
36 | private $includeJquery; |
||
37 | |||
38 | /** |
||
39 | * Set to true to change the last octet of IP addresses to 0 prior to logging |
||
40 | * @var boolean |
||
41 | */ |
||
42 | private $ipAnonymization; |
||
43 | |||
44 | /** |
||
45 | * A regular expression (max 1500 characters) matching ip addresses for |
||
46 | * filtering out visitors. Matching visitors will still see the experiments, |
||
47 | * but they won't be counted in results. |
||
48 | * @var string |
||
49 | */ |
||
50 | private $ipFilter; |
||
51 | |||
52 | /** |
||
53 | * The prefered jQuery library version you would like to use with your snippet. |
||
54 | * If you do not want to include jQuery, set include_jquery to false. Can be |
||
55 | * 'jquery-1.11.3-trim', 'jquery-1.11.3-full', 'jquery-1.6.4-trim', 'jquery-1.6.4-full' |
||
56 | * or 'none'. |
||
57 | * @var string |
||
58 | */ |
||
59 | private $library; |
||
60 | |||
61 | /** |
||
62 | * The javascript code which runs before Optimizely on all pages, regardless |
||
63 | * of whether or not there is a running experiment. |
||
64 | * @var string |
||
65 | */ |
||
66 | private $projectJavascript; |
||
67 | |||
68 | /** |
||
69 | * The current revision number of the project snippet |
||
70 | * @var integer |
||
71 | */ |
||
72 | private $codeRevision; |
||
73 | |||
74 | /** |
||
75 | * The current size in bytes of the project snippet |
||
76 | * @var integer |
||
77 | */ |
||
78 | private $jsFileSize; |
||
79 | |||
80 | |||
81 | /** |
||
82 | * Constructor. |
||
83 | */ |
||
84 | 7 | public function __construct($options = array()) |
|
103 | |||
104 | /** |
||
105 | * Returns this object as array. |
||
106 | */ |
||
107 | 3 | public function toArray() |
|
131 | |||
132 | 1 | public function getEnableForceVariation() |
|
136 | |||
137 | 7 | public function setEnableForceVariation($enableForceVariation) |
|
141 | |||
142 | 2 | public function getExcludeDisabledExperiments() |
|
146 | |||
147 | 7 | public function setExcludeDisabledExperiments($excludeDisabledExperiments) |
|
151 | |||
152 | 1 | public function getExcludeNames() |
|
156 | |||
157 | 7 | public function setExcludeNames($excludeNames) |
|
161 | |||
162 | 1 | public function getIncludeJquery() |
|
166 | |||
167 | 7 | public function setIncludeJquery($includeJquery) |
|
171 | |||
172 | 1 | public function getIpAnonymization() |
|
176 | |||
177 | 7 | public function setIpAnonymization($ipAnonymization) |
|
181 | |||
182 | 2 | public function getIpFilter() |
|
186 | |||
187 | 7 | public function setIpFilter($ipFilter) |
|
191 | |||
192 | 1 | public function getLibrary() |
|
196 | |||
197 | 7 | public function setLibrary($library) |
|
201 | |||
202 | 1 | public function getProjectJavascript() |
|
206 | |||
207 | 7 | public function setProjectJavascript($projectJavascript) |
|
211 | |||
212 | 1 | public function getCodeRevision() |
|
216 | |||
217 | 7 | public function setCodeRevision($codeRevision) |
|
221 | |||
222 | 1 | public function getJsFileSize() |
|
226 | |||
227 | 7 | public function setJsFileSize($jsFileSize) |
|
231 | } |
||
232 | |||
240 |
According to the PSR-2, the body of a case statement must start on the line immediately following the case statement.
}
To learn more about the PSR-2 coding standard, please refer to the PHP-Fig.