/** * @param string $value * @throws InvalidArgumentExpection */ public function __construct($value = StringLiteral::EMPTY_STR) { parent::__construct($value); if (empty($this->value)) { $this->generateV4(); } if (!$this->isValidV4()) { throw new InvalidArgumentExpection(__METHOD__ . '(): $value is not a valid v4 uuid'); } }
public function __construct($value = '') { parent::__construct($value); if (empty($this->value)) { $this->generateV4(); } if (!$this->isValidV4()) { throw new InvalidArgumentException(__METHOD__ . '(): $value must be a valid V4 UUID'); } }
public function __construct($value = StringLiteral::EMPTY_STR) { //must use this to call the constructor parent::__construct($value); if (empty($this->value)) { $this->generateV4(); } if (!$this->isValidV4()) { throw new InvalidArgumentException(__METHOD__ . '(): $value is not a valid v4 UUID'); } }