Class Salient\Sync\AbstractSyncEntity

abstract
extends AbstractEntity
implements SyncEntityInterface, Flushable
uses ConstructibleTrait, HasReadableProperties, HasWritableProperties, ExtensibleTrait, ProvidableTrait, HasNormaliser, RequiresContainer

Base class for entities serviced by sync providers

{@see AbstractSyncEntity} implements {@see Readable} and {@see Writable}, but protected properties are not accessible by default. Override {@see AbstractSyncEntity::getReadableProperties()} and/or {@see AbstractSyncEntity::getWritableProperties()} to change this.

The following "magic" property methods are discovered automatically and don't need to be returned by {@see AbstractSyncEntity::getReadableProperties()} or {@see AbstractSyncEntity::getWritableProperties()}:

  • protected function _get<PropertyName>()
  • protected function _isset<PropertyName>() (optional; falls back to _get<PropertyName>() if not declared)
  • protected function _set<PropertyName>($value)
  • protected function _unset<PropertyName>() (optional; falls back to _set<PropertyName>(null) if not declared)

Accessible properties are mapped to associative arrays with snake_case keys when {@see AbstractSyncEntity} objects are serialized. Override {@see AbstractSyncEntity::buildSerializeRules()} to provide serialization rules for nested entities.

Methods
Methods used from Salient\Core\Concern\ConstructibleTrait
construct(), constructMultiple()
Methods used from Salient\Core\Concern\HasReadableProperties
getReadableProperties()
Methods used from Salient\Core\Concern\HasWritableProperties
getWritableProperties()
Methods used from Salient\Core\Concern\ExtensibleTrait
getDynamicPropertiesProperty(), getDynamicPropertyNamesProperty(), setDynamicProperties(), getDynamicProperties()
Methods used from Salient\Core\Concern\ProvidableTrait
setProvider(), getProvider(), setContext(), getContext(), setService(), getService(),
Methods used from Salient\Container\RequiresContainer
requireContainer()
Constants inherited from Salient\Contract\Core\Entity\Relatable
ONE_TO_ONE, ONE_TO_MANY
Properties
Properties used from Salient\Core\Concern\ExtensibleTrait
$MetaProperties, $MetaPropertyNames