| @@ 196-201 (lines=6) @@ | ||
| 193 | case 'options':  | 
                                |
| 194 | $this->setOptions($val);  | 
                                |
| 195 | break;  | 
                                |
| 196 | case 'max':  | 
                                |
| 197 | if( (!is_int($val) && !is_float($val)) || $val < 0 )  | 
                                |
| 198 |         {
 | 
                                |
| 199 |           throw new Exception(sprintf("%s must be a number greater then 0. Value set: %s", $key, $val));
 | 
                                |
| 200 | }  | 
                                |
| 201 | break;  | 
                                |
| 202 | case 'step':  | 
                                |
| 203 | if( (!is_int($val) && !is_float($val)) || $val < 0 )  | 
                                |
| 204 |         {
 | 
                                |
| @@ 202-210 (lines=9) @@ | ||
| 199 |           throw new Exception(sprintf("%s must be a number greater then 0. Value set: %s", $key, $val));
 | 
                                |
| 200 | }  | 
                                |
| 201 | break;  | 
                                |
| 202 | case 'step':  | 
                                |
| 203 | if( (!is_int($val) && !is_float($val)) || $val < 0 )  | 
                                |
| 204 |         {
 | 
                                |
| 205 |           throw new Exception(sprintf("%s must be a number greater then 0. Value set: %s", $key, $val));
 | 
                                |
| 206 | }  | 
                                |
| 207 | // Step is now an option.  | 
                                |
| 208 | $this->options['step'] = $val;  | 
                                |
| 209 | ||
| 210 | return;  | 
                                |
| 211 | default:  | 
                                |
| 212 |         throw new Exception(sprintf("%s does not exists", $key));
 | 
                                |
| 213 | break;  | 
                                |