Index

iEntity

MMO\core\interfaces · 1 symbol · generated 30 Sep 2026

interface

iEntity

iEntity.php:13

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\interfaces
Implements
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.

Index

FLAG_CHANGED
FLAG_CREATED
FLAG_IGNORE_CHANGE
FLAG_IGNORE_ENTITY
FLAG_OPACIFY
FLAG_REMOVED
addFlags($flags) abstract
archive() abstract
clearChanges() abstract
debugName() abstract
get($path, $default) abstract
getChanges($asArray, $store) abstract
getCollection() abstract
getErrors() abstract
getFlags() abstract
getId() abstract
getRepository() abstract
getStatus() abstract
getTitle() abstract
hasStatusChanged() abstract
isArchive() abstract
isChanged() abstract
isCreated() abstract
isFinal() abstract
isRemoved() abstract
isValid() abstract
loadArray($data, $coerceOptions, $fromStore) abstract
loadFromStore($data) abstractLoad data as read from storage: not recorded as a change.
localName() abstractGet the local name (collection name and this id) in the current repository
markChanged($keys) abstract
removeFlags($flags) abstract
removePermanently() abstractRemove it for good: only an archived entity can be.
setArrayPropertyOffset($key, $offset, $value, $coerceOptions) abstract
setStatus($status) abstract
store() abstract
test($filter) abstract
toLink($attributes) abstract

Constants6

FLAG_CHANGED

const FLAG_CHANGED = 1

FLAG_CREATED

const FLAG_CREATED = 2

FLAG_IGNORE_CHANGE

const FLAG_IGNORE_CHANGE = 8

FLAG_IGNORE_ENTITY

const FLAG_IGNORE_ENTITY = 24

FLAG_OPACIFY

const FLAG_OPACIFY = 32

FLAG_REMOVED

const FLAG_REMOVED = 4

Methods31

archive()

abstractiEntity.php:74
abstract function archive(): bool
returnsboolfalse if it could not be archived

get($path, $default)

abstractiEntity.php:44
abstract function get(string $path, mixed $default = null): mixed
$pathstring
$default = nullmixed
returnsmixedthe value at $path (a property name, or a /-separated path into it), or $default

getChanges($asArray, $store)

abstractiEntity.php:61
abstract function getChanges(bool $asArray = false, bool $store = true): array
$asArray = falsebool
$store = truebool
returnsarraythe properties changed since the last commit

getFlags()

abstractiEntity.php:57
abstract function getFlags(): int
returnsintthe FLAG_* bitmask

hasStatusChanged()

abstractiEntity.php:70
abstract function hasStatusChanged(): bool
returnsbool

loadArray($data, $coerceOptions, $fromStore)

abstractiEntity.php:46
abstract function loadArray(array $data, array $coerceOptions = [], bool $fromStore = false): static
$dataarray
$coerceOptions = []array
$fromStore = falsebool
returnsstaticitself, $data loaded into its properties

loadFromStore($data)

abstractiEntity.php:48

Load data as read from storage: not recorded as a change.

abstract function loadFromStore(array $data): void
$dataarray
returnsvoid

localName()

abstractiEntity.php:38

Get the local name (collection name and this id) in the current repository

abstract function localName(): string
returnsstring

markChanged($keys)

abstractiEntity.php:64
abstract function markChanged(string ...$keys): bool
...$keysstring
returnsboolfalse while changes are ignored

removeFlags($flags)

abstractiEntity.php:59
abstract function removeFlags(int $flags): bool
$flagsint
returnsbool

removePermanently()

abstractiEntity.php:76

Remove it for good: only an archived entity can be.

abstract function removePermanently(): void
returnsvoid

setArrayPropertyOffset($key, $offset, $value, $coerceOptions)

abstractiEntity.php:50
abstract function setArrayPropertyOffset( string $key, string|int|null $offset, mixed $value, array $coerceOptions = [] ): bool
$keystring
$offsetstring | int | null
$valuemixed
$coerceOptions = []array
returnsboolfalse if the value could not be set (getErrors)

setStatus($status)

abstractiEntity.php:69
abstract function setStatus(MMO\core\entities\cStatus $status): bool
$statuscStatus
returnsboolfalse if the transition was refused

test($filter)

abstractiEntity.php:53
abstract function test(MMO\core\interfaces\iFilter $filter): bool
$filteriFilter
returnsboolwhether it matches $filter
Inherited members (12)
MethodsDeclared byDescription
ArrayProperties()iArrayProperties
ArrayProperty($name)iArrayProperties
compareTo($value)iComparable
HiddenPath($path)iArrayProperties
mutate($type, $path, $value, $oldValue)iMutationObserver
offsetExists($offset)ArrayAccess
offsetGet($offset)ArrayAccess
offsetSet($offset, $value)ArrayAccess
offsetUnset($offset)ArrayAccess
Schema()iSchemaProvider
toArray($fields)iArrayProperties
uid()iIdentifiableGet the unique identifier