$targetType
$targetType : string
Object type of this revision (required)
Represents the changeset of an object.
A revision is a record of modifications to an object.
Intended to be used to collect all routes related to models under a single source (e.g., database table).
\Charcoal\Object\Charcoal\Object\ObjectRoute for a similar model that aggregates data under a common source.
setTargetType(string $targetType) : \Charcoal\Object\ObjectRevision
string | $targetType | The object type (type-ident). |
If the obj type parameter is not a string.
Chainable
setTargetId(mixed $targetId) : \Charcoal\Object\ObjectRevision
mixed | $targetId | The object ID. |
Chainable
setRevNum(integer $revNum) : \Charcoal\Object\ObjectRevision
integer | $revNum | The revision number. |
If the revision number argument is not numerical.
Chainable
setRevTs(mixed $revTs) : \Charcoal\Object\ObjectRevision
mixed | $revTs | The revision's timestamp. |
If the timestamp is invalid.
Chainable
setRevUser(string $revUser) : \Charcoal\Object\ObjectRevision
string | $revUser | The revision user ident. |
If the revision user parameter is not a string.
Chainable
setDataPrev(string|array $data) : \Charcoal\Object\ObjectRevision
string|array | $data | The previous revision data. |
Chainable
setDataObj(array|string $data) : \Charcoal\Object\ObjectRevision
array|string | $data | The current revision (object) data. |
Chainable
setDataDiff(array|string $data) : \Charcoal\Object\ObjectRevision
array|string | $data | The data diff. |
createFromObject(\Charcoal\Object\RevisionableInterface $obj) : \Charcoal\Object\ObjectRevision
Create a new revision from an object
\Charcoal\Object\RevisionableInterface | $obj | The object to create the revision from. |
Chainable
lastObjectRevision(\Charcoal\Object\RevisionableInterface $obj) : \Charcoal\Object\ObjectRevision
\Charcoal\Object\RevisionableInterface | $obj | The object to load the last revision of. |
The last revision for the give object.
objectRevisionNum(\Charcoal\Object\RevisionableInterface $obj, integer $revNum) : \Charcoal\Object\ObjectRevision
Retrieve a specific object revision, by revision number.
\Charcoal\Object\RevisionableInterface | $obj | Target object. |
integer | $revNum | The revision number to load. |