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 __construct($value) { parent::__construct("\"{$value}\""); }