Example #1
0
 function __construct($min = 0, $max = 0, $name = null, $options = null)
 {
     parent::__construct($name, $options);
     if ($max < $min && $max > 0) {
         throw new \Exception();
     }
     $this->min = $min;
     $this->max = $max;
 }
Example #2
0
 function __construct($min = 0, $max = 0, $name = null, $options = null)
 {
     parent::__construct($name, $options);
     if ($max < $min && $max > 0) {
         throw new Exception("maximum ( {$max} ) larger than minimum ( {$min} )");
     }
     $this->min = $min;
     $this->max = $max;
 }