@@ 65-72 (lines=8) @@ | ||
62 | case 'total_count': $this->setTotalCount($value); break; |
|
63 | case 'treatment_count': $this->setTreatmentCount($value); break; |
|
64 | case 'treatment_reach': $this->setTreatmentReach($value); break; |
|
65 | case 'variations': { |
|
66 | $variations = array(); |
|
67 | foreach ($value as $name=>$variationInfo) { |
|
68 | $variations[$name] = new VariationReach($variationInfo); |
|
69 | } |
|
70 | $this->setVariations($variations); |
|
71 | break; |
|
72 | } |
|
73 | default: |
|
74 | throw new Exception('Unknown option: ' . $name); |
|
75 | } |
@@ 168-175 (lines=8) @@ | ||
165 | case 'name': $this->setName($value); break; |
|
166 | case 'schedule': $this->setSchedule(new Schedule($value)); break; |
|
167 | case 'status': $this->setStatus($value); break; |
|
168 | case 'variations': { |
|
169 | $variations = array(); |
|
170 | foreach ($value as $variationInfo) { |
|
171 | $variations[] = new Variation($variationInfo); |
|
172 | } |
|
173 | $this->setVariations($variations); |
|
174 | break; |
|
175 | } |
|
176 | case 'id': $this->setId($value); break; |
|
177 | case 'is_classic': $this->setIsClassic($value); break; |
|
178 | case 'type': $this->setType($value); break; |