setInContainerNotWritten

This commit is contained in:
Yuri Kuznetsov
2025-02-20 17:39:20 +02:00
parent bf28abc4ca
commit 7f4bc6f952
2 changed files with 22 additions and 10 deletions
+16 -4
View File
@@ -274,16 +274,28 @@ class BaseEntity implements Entity
}
/**
* Set a value in the container.
*
* @param mixed $value
* Set a value in the container. To be used wisely. Use `set` instead.
*/
protected function setInContainer(string $attribute, $value): void
protected function setInContainer(string $attribute, mixed $value): void
{
$this->valuesContainer[$attribute] = $value;
$this->writtenMap[$attribute] = true;
}
/**
* Not to be used. To be used internally for lazy-loading purpose.
*
* @internal
* @since 9.1.0
*/
protected function setInContainerNotWritten(string $attribute, mixed $value): void
{
$this->valuesContainer[$attribute] = $value;
unset($this->writtenMap[$attribute]);
}
/**
* Whether an attribute is set in the container.
*/