| addFlags($flags) | aEntity | |
| addLink($link) | aEntity | Append a link. |
| archive() | aEntity | This function is called to 'delete' the entity. |
| ArrayProperties() | aEntity | Build (once per class, then cached in the static $ArrayProperties array) the list of every #[ArrayProperty] declared on this class, its parent classes, and the traits they use -- by reflection… |
| ArrayProperty($name) | aEntity | |
| CheckData($data, $errors) | aEntity | Check data before it touches any entity: would an entity made from $data be valid? |
| clearChanges() | aEntity | Reset change tracking: clears iEntity::FLAG_CHANGED and forgets every recorded change. |
| compareTo($value) | aEntity | Compare value |
| conversionError($key, $e) | aEntity | The error recorded for a value that could not be set at all (usually: it could not be converted to its property's type), in the same form as a validation error. |
| get($path, $default) | aEntity | Read a (possibly nested) value by json-path, e.g. |
| getArrayProperty($key, $isRef, $store) | aEntity | Read a single array property's current value, through its getter (a direct property, a path alias, or a method). |
| getChanges($asArray, $store) | aEntity | |
| getErrors() | aEntity | |
| getFlags() | aEntity | |
| getLabel() | aEntity | |
| getLinks() | aEntity | |
| getLinksByRel($rels, $all) | aEntity | Get a list of Reference that have a specific relationship. |
| getMetadata() | aEntity | |
| getStatus() | aEntity | |
| getTitle() | aEntity | |
| getView() | aEntity | |
| hasChanged($keys) | aEntity | |
| hasFlags($flags, $strict) | aEntity | |
| hasStatusChanged() | aEntity | |
| HiddenPath($path) | aEntity | The hidden property (ArrayProperty::isHidden) a json-path goes through, known from the declared types alone: of this class, or of a class a property on the way may hold -- every class of its t… |
| ignoreChanges($value) | aEntity | Temporarily suppress markChanged (used e.g. |
| isActive() | aEntity | |
| isArchive() | aEntity | |
| isArrayPropertySet($key, $store) | aEntity | |
| isChanged() | aEntity | |
| isCreated() | aEntity | |
| isDraft() | aEntity | |
| isEmpty() | aEntity | |
| isFinal() | aEntity | |
| isHiddenPath($path) | aEntity | |
| isOpacified() | aEntity | |
| isPending() | aEntity | |
| isRemoved() | aEntity | |
| isSimilar($value) | aEntity | Compare entities using unique fields (@unique), to find if they represent the same entity |
| isUnique() | aEntity | Tells if an entity has enough information to be unique (at least one unique group has no null) |
| isValid() | aEntity | |
| isValidated() | aEntity | |
| ListClassReferences($onlyStorable) | aEntity | Get a list of all the classes and their properties that are using references to this class. |
| loadArray($data, $coerceOptions, $fromStore) | aEntity | Set every entry of $data as an array property, through setArrayProperty (so each value is coerced by its property's schema). |
| loadFromStore($data) | aEntity | Load $data as this entity's initial state (e.g. |
| markChanged($keys) | aEntity | Mark one or multiple key as changed |
| mutate($type, $path, $value, $oldValue) | aEntity | \MMO\core\interfaces\iMutationObserver::mutate -- besides the normal tArrayProperties::mutate behavior, walks up $path to find the nearest enclosing aEntity (the mutation may have happened dee… |
| offsetExists($key) | aEntity | \ArrayAccess::offsetExists -- tells whether $key is a *declared* #[ArrayProperty], not whether it currently holds a non-default value (use isArrayPropertySet for that). |
| offsetGet($key) | aEntity | \ArrayAccess::offsetGet |
| offsetSet($key, $value) | aEntity | \ArrayAccess::offsetSet |
| offsetUnset($key) | aEntity | \ArrayAccess::offsetUnset -- equivalent to setting the property to null (its coerced value depends on the property's schema: e.g. |
| opacify($value) | aEntity | Hide this entity's properties from toArray output (typically used to redact an entity the current viewer isn't allowed to see the details of, while still letting it be referenced by uid/metadata). |
| push($path, $value) | aEntity | Append a value to a (possibly nested) list property by json-path. |
| removeFlags($flags) | aEntity | |
| removeLink($link) | aEntity | Remove a link (by identity). |
| removePermanently() | aEntity | Remove this entity from the repository once MMO\commit() is called WARNING: This will permanently remove the entity. |
| Schema() | aEntity | The JSON-Schema describing every #[ArrayProperty] of this class (built once and cached by ArrayProperties). |
| SearchProperty($name) | aEntity | |
| set($path, $value) | aEntity | Write a (possibly nested) value by json-path, creating intermediate structure as needed. |
| setArrayProperty($key, $value, $coerceOptions, $ignoreReadonly) | aEntity | Same as tArrayProperties::setArrayProperty, plus: any coercion/validation failure is caught and recorded in getErrors (making the entity isValid()-false) instead of propagating as an… |
| setArrayPropertyOffset($key, $offset, $value, $coerceOptions) | aEntity | Same as tArrayProperties::setArrayPropertyOffset, plus: when pushing (offset === null) a new entity onto a list property, if an existing item is isSimilar to the new value, that item's of… |
| setLinks($links) | aEntity | Replace every link with $links. |
| setStatus($status) | aEntity | |
| store() | aEntity | Export all array properties with store set to true. |
| test($filter) | aEntity | |
| toArray($fields, $flatten, $recursive) | aEntity | Same as tArrayProperties::toArray, except an isOpacified entity always exports only its 'uid' and 'metadata' (its other properties are hidden from output). |
| toLink($attributes) | aEntity | |
| traitMutate($type, $path, $value, $oldValue) | aEntity | \MMO\core\interfaces\iMutationObserver::mutate -- reacts to a mutation that happened deep inside one of this object's array properties (e.g. |
| traitSetArrayProperty($key, $value, $coerceOptions, $fromStore) | aEntity | Set array property |
| traitSetArrayPropertyOffset($key, $offset, $value, $coerceOptions) | aEntity | Set/push a value into an array property |
| traitToArray($fields, $flatten, $recursive) | aEntity | Export fields to an array. |
| validate($errors) | aEntity | Validate this entity: its current values against its own tArrayProperties::Schema, plus every value that could not even be set -- one that could not be converted to its property's type never r… |
| View() | aEntity | |