Revisions final readonly class
Minn\Content\Revisions · public/minn/src/Minn/Content/Revisions.php · 95 lines
Revision rows: the plain snapshots and the per-author autosave slots.
Uses 3
Constants and properties
| private | readonly Minn\Db $db | Promoted from the constructor. |
| private | readonly Minn\Content\PostWriter $writer | Promoted from the constructor. |
| private | readonly Minn\Content\Site $site | Promoted from the constructor. |
Public
| new | __construct(Minn\Db $db, Minn\Content\PostWriter $writer, Minn\Content\Site $site)# | |
| method | revisionsOf(int $parentId): array# | The revisions, or the autosaves, of a post, newest first, as rows. @return list<array> newest first |
| method | allOf(int $parentId): array# | Every revision of a post, its autosaves among them, newest first by date then id, as rows: what the revisions route lists (probe rest-latest-revision). |
| method | autosavesOf(int $parentId): array# | The autosaves of a post, newest first, as rows. |
| method | saveAutosave(int $parentId, int $userId, string $title, string $content, string $excerpt): int# | One autosave slot per author: updated in place when it exists. |
Internals 1
Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.
| private | named(int $parentId, string $comparison): array# |
Nothing matches.