API reference / Quittio \ Core \ Data
Identifier
final readonly class in quittio/core · uses Immutable
Quittio\Core\Data\Identifier · Source
Identifier with an optional scheme (ISO/IEC 6523 ICD or another code list depending on the field).
Properties#
| Property | Type | Description |
|---|---|---|
$scheme readonly | IdentifierScheme|RawCode|null | |
$value readonly | string |
Methods#
| Method | Description |
|---|---|
->__construct() | |
::of() | |
->schemeValue() | |
->with() | Returns a copy with the given properties replaced. |
__construct()#
public function __construct(string $value, IdentifierScheme|RawCode|null $scheme = null)| Parameter | Type | Description |
|---|---|---|
$value | string | |
$scheme | IdentifierScheme|RawCode|null = null |
of()#
public static function of(
string $value,
IdentifierScheme|RawCode|string|null $scheme = null,
): self| Parameter | Type | Description |
|---|---|---|
$value | string | |
$scheme | IdentifierScheme|RawCode|string|null = null |
- Returns
self
schemeValue()#
public function schemeValue(): ?string- Returns
?string
with()#
public function with(array<string, mixed> $changes): staticReturns a copy with the given properties replaced.
| Parameter | Type | Description |
|---|---|---|
$changes | array<string, mixed> |
- Returns
static