Protected$dataThe data proxy object.
Protected$dataThe data proxy handler.
Protected$dataThe actual data store.
Protected$dirtyA map of props to whether they're dirty (for patch).
Protected$isWhether this instance is a sleeping reference.
The instance of Nymph to use for queries.
Protected$originalArray of the entity's original tags (for patch).
Protected$sleepingThe reference to use to wake.
Protected$wakeA promise that resolved when the entity's data is wake.
The creation date of the entity as a high precision Unix timestamp.
The entity's Globally Unique ID.
The modified date of the entity as a high precision Unix timestamp.
Array of the entity's tags.
StaticclassThe lookup name for this entity.
This is used for reference arrays (and sleeping references) and server requests.
StaticnymphThe instance of Nymph to use for queries.
Protected StaticstoresAdd one or more tags.
List of tags.
Search the array for this object and return the corresponding index.
If strict is false, is() is used to compare. If strict is true,
equals() is used.
The array to search.
Optionalstrict: booleanWhether to use stronger comparison.
The index if the object is in the array, -1 if it isn't.
Check if this is a sleeping reference.
Protected$checkCheck if this is a sleeping reference and throw an error if so.
Delete the object from storage.
True on success, false on failure.
Perform a more strict comparison of this object to another.
The object to compare.
True or false.
Optionalability: stringGet a patch of this entity's dirty data to be applied on the server.
Check that the entity has all of the given tags.
List of tags.
True or false.
Check whether this object is in an array.
If strict is false, is() is used to compare. If strict is true,
equals() is used.
The array to search.
Optionalstrict: booleanWhether to use stronger comparison.
True if the object is in the array, false if it isn't.
Initialize this entity from a JSON representation.
The entity JSON.
Perform a less strict comparison of this object to another.
The object to compare.
True or false.
Check whether a property is dirty.
To be a dirty property, it must have been set or deleted since the entity was initialized. A clean property existed on initialization and hasn't been set or deleted. An untracked property didn't exist on initialization and hasn't been set or deleted.
Note that this doesn't necessarily mean the property has changed. It could have been set to the same value, or created and then deleted.
Entities are initialized when they are pulled from the server or saved.
This is done with the $init method.
The name of a property.
True if it's dirty, false if not, and null if it's not tracked.
Save the object's dirty data to storage.
True on success, false on failure.
Protected$referenceRefresh the object from storage. (Bypasses Nymph's cache.)
If the object has been deleted from storage, the database cannot be
reached, or a database error occurs, refresh() will return 0.
False if the data has not been saved, 0 if it can't be refreshed, true on success.
Remove one or more tags.
List of tags.
Save the object to storage.
True on success, false on failure.
Call an instance method on the server version of this entity.
The entity's data will be sent up to the server as well, so the server's state can match the client's state. It won't be propagated into the DB, though.
The name of the method.
The parameters to call the method with.
Optionalstateless: booleanWhether the server should return, and the client update, the data in the entity after the method has run.
The value that the method on the server returned.
Return a Nymph Entity Reference for this entity.
If the entity hasn't been saved yet (and has no GUID), it will be returned instead.
A Nymph Entity Reference array as an unsaved entity.
StaticcurrentOptionalreturnObjectIfNotExist: falseStaticfactoryCreate or retrieve a new entity instance.
Note that this will always return an entity, even if the GUID is not found.
Optionalguid: stringAn optional GUID to retrieve.
StaticfactoryCreate a new sleeping reference instance.
Sleeping references won't retrieve their data from the server until they
are readied with $wake() or a parent's $wakeAll().
The Nymph Entity Reference to use to wake.
The new instance.
StaticfactoryCreate a new entity instance.
StaticfactoryStaticgetStaticgetStaticinitStaticloginStaticoffStaticonStaticrecoverStaticsendStaticserverCall a static method on the server version of this entity.
The name of the method.
The parameters to call the method with.
The value that the method on the server returned.
StaticserverCall a static iterator method on the server version of this entity.
The name of the method.
The parameters to call the method with.
An iterator that iterates over values that the method on the server yields.
Entity interface.