Exemple #1
0
 public function __construct($value)
 {
     if (0 == preg_match('#^\\+?\\d+(\\,\\d+){1,2}$#', $value)) {
         throw new \Exception('value should be of form #^\\+?\\d+(\\,\\d+){1,2}$#');
     }
     parent::__construct($value);
 }
Exemple #2
0
 public function setValue($value)
 {
     if (0 == preg_match('#^\\d+(\\.\\d+)?(\\:\\d+(\\.\\d+)?)*$#', $value)) {
         throw new \Exception('value should be of form #^\\d+(\\.\\d+)?(\\:\\d+(\\.\\d+)?)*$#');
     }
     parent::setValue("\"{$value}\"");
 }
Exemple #3
0
 public function __construct($value)
 {
     if (0 == preg_match('#^\\d+(\\.\\d+)?$#', $value)) {
         throw new \Exception('value should be of form #^\\d+(\\.\\d+)?$#');
     }
     parent::setValue($value);
 }
Exemple #4
0
 public function __construct($value)
 {
     parent::__construct("\"{$value}\"");
 }