trait Snapshot
Public API: explicitly declared with @visibility public.

Closes the PHP paths that would change or re-create a semantic value without its constructor.

Refusing to copy a semantic valuedoctest
clone new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id') // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstruction
Refusing a dynamic propertydoctest
$name = new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id');
    $name->extra = 'x' // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstruction: dynamic properties
Refusing serializationdoctest
serialize(new \SqlSemantics\Platform\MySql\Model\Statement\Identifier\Name('id')) // throws \SqlSemantics\Platform\MySql\Model\Diagnostic\InvalidConstruction: serialized

Methods§

public function __clone()

Refuses a copy, which would blur which occurrence a value is.

Throws

Calls 1
public function __set(string $name, mixed $value): void

Refuses a dynamic property.

Parameters

$namestring
$valuemixed

Throws

Calls 1
public function __serialize(): array<string, mixed>

Refuses serialization, so that a value can only come from construction.

Returns

array<string, mixed>

Throws

Calls 1
public function __unserialize(array<string, mixed> $data): void

Refuses restoration without construction.

Parameters

$dataarray<string, mixed>

Throws

Calls 1

Relations§

Used by 640
Constant reads 1