From 17f3a2f0599003880f8a7ac7d6b0195560d32dd7 Mon Sep 17 00:00:00 2001 From: "J. King" Date: Wed, 13 Feb 2019 12:37:41 -0500 Subject: [PATCH] Start on an API overview for the Database class --- lib/Database.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/lib/Database.php b/lib/Database.php index 49ebf523..dfa9e7c4 100644 --- a/lib/Database.php +++ b/lib/Database.php @@ -13,6 +13,27 @@ use JKingWeb\Arsse\Misc\Context; use JKingWeb\Arsse\Misc\Date; use JKingWeb\Arsse\Misc\ValueInfo; +/** The high-level interface with the database + * + * The database stores information on the following things: + * + * - Users + * - Subscriptions to feeds, which belong to users + * - Folders, which belong to users and contain subscriptions + * - Feeds to which users are subscribed + * - Articles, which belong to feeds and for which users can only affect metadata + * - Editions, identifying authorial modifications to articles + * - Labels, which belong to users and can be assigned to multiple articles + * - Sessions, used by some protocols to identify users across periods of time + * - Metadata, used internally by the server + * + * The various methods of this class perform operations on these things, with + * each public method prefixed with the thing it concerns e.g. userRemove() + * deletes a user from the database, and labelArticlesSet() changes a label's + * associations with articles. There has been an effort to keep public method + * names consistent throughout, but protected methods, having different + * concerns, will typicsally follow different conventions. + */ class Database { /** The version number of the latest schema the interface is aware of */ const SCHEMA_VERSION = 4;