Mongolid\DataMapper\EntityAssembler::prepareOriginalAttributes PHP Method

prepareOriginalAttributes() protected method

Stores original attributes from Entity if needed.
protected prepareOriginalAttributes ( mixed $entity ) : mixed
$entity mixed The entity that may have the attributes stored.
return mixed The entity with original attributes.
    protected function prepareOriginalAttributes($entity)
    {
        if ($entity instanceof AttributesAccessInterface) {
            $entity->syncOriginalAttributes();
        }
        return $entity;
    }