protected function setVersion($version) {
    if ($version == self::V3 || $version == self::V4 || $version == self::V5) {
      $this->version = $version;
    }
    else {
      throw new Exception('An invalid UUID version was specified.');
    }
  }