/** * Returns a `Uuid` * * Uses the configured builder and codec and the provided array of hexadecimal * value UUID fields to construct a `Uuid` object. * * @param array $fields An array of fields from which to construct a UUID; * see {@see \Ramsey\Uuid\UuidInterface::getFieldsHex()} for array structure. * @return UuidInterface */ public function uuid(array $fields) { return $this->uuidBuilder->build($this->codec, $fields); }
/** * Decodes a string representation of a UUID into a UuidInterface object instance * * @param string $encodedUuid * @return UuidInterface */ public function decode($encodedUuid) { $components = $this->extractComponents($encodedUuid); $fields = $this->getFields($components); return $this->builder->build($this, $fields); }