Definition at line 15 of file DocumentHistory.php.
Public Member Functions | |
| __construct (\Depage\Db\Pdo $pdo, $tablePrefix, Document $document) | |
| getVersions ($published=null, $maxResults=null) | |
| getVersions | |
| getLatestVersion () | |
| getLatestVersion | |
| getXml ($timestamp, $addIdAttribute=true) | |
| getXml | |
| getLastPublishedXml ($addIdAttribute=true) | |
| getLastPublishedXml | |
| save ($userId, $published=false) | |
| gets the current document xml and saves a version to the history add SHA hash column for data integrity | |
| restore ($timestamp) | |
| Restores the document to a previous state. | |
| delete ($timestamp) | |
| Delete. | |
| __construct | ( | \Depage\Db\Pdo | $pdo, |
| $tablePrefix, | |||
| Document | $document ) |
Definition at line 23 of file DocumentHistory.php.
| delete | ( | $timestamp | ) |
| $timestamp |
Definition at line 248 of file DocumentHistory.php.
| getLastPublishedXml | ( | $addIdAttribute = true | ) |
load xml from last published version from history
Definition at line 147 of file DocumentHistory.php.
| getLatestVersion | ( | ) |
gets the last document version
Definition at line 94 of file DocumentHistory.php.
| getVersions | ( | $published = null, | |
| $maxResults = null ) |
Gets versions of the docment in the history. returns array of time, user_id, published, and hash per version in array indexed on the last change time.
| bool | $published | |
| int | $maxResults |
Definition at line 45 of file DocumentHistory.php.
| getXml | ( | $timestamp, | |
| $addIdAttribute = true ) |
| int | $timestamp | |
| bool | $addIdAttribute |
Definition at line 108 of file DocumentHistory.php.
| restore | ( | $timestamp | ) |
Definition at line 232 of file DocumentHistory.php.
| save | ( | $userId, | |
| $published = false ) |
| int | $userId | |
| bool | $published |
Definition at line 165 of file DocumentHistory.php.