DirtyChecksums
in package
implements
NotSerializable
Table of Contents
Interfaces
- NotSerializable
- When serializing with {@see SerializeTrait} child properties that implement this are skipped.
Properties
- $checksums : array<string|int, string>
- $target : object
Methods
- __construct() : mixed
- Initialise this checksums store.
- getAllDirty() : array<string|int, mixed>
- Retrieve data that has changed since the last checksum.
- isDirty() : bool
- Has this property changed since the last checksum/update?
- markDirty() : void
- Forcefully mark this property as dirty.
- reset() : void
- Reset all checksums.
- update() : void
- Update all checksums.
- updateField() : void
- Update the checksum for this field.
- getChecksum() : string
- Get a checksum for this value.
- getProperties() : Traversable
- Get an iterator for the target object.
Properties
$checksums
public
array<string|int, string>
$checksums
= []
[ name => sha ]
$target
public
object
$target
Methods
__construct()
Initialise this checksums store.
public
__construct(object $target) : mixed
This creates checksums for all public properties of the target.
Parameters
- $target : object
getAllDirty()
Retrieve data that has changed since the last checksum.
public
getAllDirty() : array<string|int, mixed>
Return values
array<string|int, mixed> —[name => value]
isDirty()
Has this property changed since the last checksum/update?
public
isDirty(string $name) : bool
Parameters
- $name : string
Return values
boolmarkDirty()
Forcefully mark this property as dirty.
public
markDirty(string $name) : void
Parameters
- $name : string
reset()
Reset all checksums.
public
reset() : void
This means all properties are DIRTY.
update()
Update all checksums.
public
update() : void
This means all properties are CLEAN.
updateField()
Update the checksum for this field.
public
updateField(string $name) : void
Parameters
- $name : string
getChecksum()
Get a checksum for this value.
protected
getChecksum(mixed $value) : string
The value must be a scalar, array or serializable object.
Parameters
- $value : mixed
Return values
stringgetProperties()
Get an iterator for the target object.
protected
getProperties() : Traversable