Documentations › mmo.core › php › interfaces iEntity MMO\core\interfaces · 1 symbol · generated 30 Sep 2026
An entity: one record, its values read and written by property name, its changes tracked until a commit.
interface MMO\core\interfaces\iEntity
extends MMO\core\interfaces\iArrayProperties,
MMO\core\interfaces\iIdentifiable,
MMO\core\interfaces\iComparable Namespace MMO\core\interfacesImplements iArrayProperties , iIdentifiable , iComparable See aEntity implements all of it (every entity extends it, through Entity or EmbeddedEntity): this interface declares what the framework itself relies on, so code typed against it works with any entity.Constants6 const FLAG_CHANGED = 1 const FLAG_CREATED = 2 const FLAG_IGNORE_CHANGE = 8 const FLAG_IGNORE_ENTITY = 24 const FLAG_OPACIFY = 32 const FLAG_REMOVED = 4 Methods31 abstract function addFlags(int $flags): bool abstract function archive(): bool returns bool false if it could not be archived
abstract function clearChanges(): void abstract function debugName(): string abstract function get(string $path, mixed $default = null): mixed $path string $default = null mixed returns mixed the value at $path (a property name, or a /-separated path into it), or $default
abstract function getChanges(bool $asArray = false, bool $store = true): array $asArray = false bool $store = true bool returns array the properties changed since the last commit
abstract function getCollection(): ?MMO\core\interfaces\iCollection abstract function getErrors(): array abstract function getFlags(): int returns int the FLAG_* bitmask
abstract function getId(): mixed abstract function getRepository(): ?MMO\core\interfaces\iRepository abstract function getStatus(): MMO\core\entities\cStatus abstract function getTitle(): string abstract function hasStatusChanged(): bool abstract function isArchive(): bool abstract function isChanged(): bool abstract function isCreated(): bool abstract function isFinal(): bool abstract function isRemoved(): bool abstract function isValid(): bool abstract function loadArray(array $data, array $coerceOptions = [], bool $fromStore = false): static $data array $coerceOptions = [] array $fromStore = false bool returns static itself, $data loaded into its properties
Load data as read from storage: not recorded as a change.
abstract function loadFromStore(array $data): void Get the local name (collection name and this id) in the current repository
abstract function localName(): string abstract function markChanged(string ...$keys): bool ...$keys string returns bool false while changes are ignored
abstract function removeFlags(int $flags): bool Remove it for good: only an archived entity can be.
abstract function removePermanently(): void setArrayPropertyOffset($key, $offset, $value, $coerceOptions) abstract iEntity.php:50 abstract function setArrayPropertyOffset(
string $key,
string|int|null $offset,
mixed $value,
array $coerceOptions = []
): bool abstract function setStatus(MMO\core\entities\cStatus $status): bool $status cStatus returns bool false if the transition was refused
abstract function store(): array abstract function test(MMO\core\interfaces\iFilter $filter): bool abstract function toLink(array $attributes = []): MMO\core\server\Link Inherited members (12)