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); }
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}\""); }
public function __construct($value) { if (0 == preg_match('#^\\d+(\\.\\d+)?$#', $value)) { throw new \Exception('value should be of form #^\\d+(\\.\\d+)?$#'); } parent::setValue($value); }
public function __construct($value) { parent::__construct("\"{$value}\""); }