Tiger_Model_PageVersion

@api · extends Tiger_Model_Table

PageVersion — append-only page history (see migration 0015).

Tiger_Model_Page::save() snapshots the saved content here as an incrementing version on every save (so page_version[max] mirrors the live page), and restore() writes a chosen version back onto the page. Immutable: no update / no soft-delete.

Methods

nextVersion()

nextVersion($pageId)

The next version number for a page (1-based).

  • $pageId string — the page id

Returns int — the next version number

snapshot()

snapshot($pageId, array $fields)

Snapshot a page's content as a new version. Returns the version number.

  • $pageId string — the page id
  • $fields array — the content to snapshot (title, body, format, meta, status)

Returns int — the version number written

recentForPage()

recentForPage($pageId, $limit = 50)

A page's versions, newest first.

  • $pageId string — the page id
  • $limit int — the maximum number of versions to return

Returns Zend_Db_Table_Rowset_Abstract — the versions, newest first

get()

get($pageId, $version)

One version of a page, or null.

  • $pageId string — the page id
  • $version int — the version number

Returns Zend_Db_Table_Row_Abstract|null — the version row, or null