API / Minn\Admin / V1Controller

V1Controller final readonly class

Minn\Admin\V1Controller · public/minn/src/Minn/Admin/V1Controller.php · 80 lines

The boot burst of minn-admin/v1: the bell feed and its read marker, the core status, and the one-round-trip boot-status the app starts from. Every route sits behind the same capability floor (edit_posts) the plugin declares.

Used by 1

Constants and properties

privatereadonly Minn\Db $db

Promoted from the constructor.

privatereadonly Minn\Admin\Notifications $notifications

Promoted from the constructor.

privatereadonly Minn\Ops\CoreStatus $core

Promoted from the constructor.

privatereadonly Minn\Admin\AdminTypes $types

Promoted from the constructor.

privatereadonly Minn\Rest\Caller $caller

Promoted from the constructor.

Public

new__construct(Minn\Db $db, Minn\Admin\Notifications $notifications, Minn\Ops\CoreStatus $core, Minn\Admin\AdminTypes $types, Minn\Rest\Caller $caller)#
methodnotifications(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/notifications (floor edit_posts)#

The bell feed.

methodnotificationsRead(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/notifications/read (floor edit_posts)#

Body {id} marks one read; {} marks all read.

methodcore(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/core (floor edit_posts)#

Minn's version and any newer release; a day-old check of the update service runs once the answer is sent.

methodcoreUpdate(Minn\Http\Request $request): Minn\Http\ResponsePOST /minn-admin/v1/core/update (floor edit_posts + update_core)#

Replaces the running engine with the release on offer.

methodbootStatus(Minn\Http\Request $request): Minn\Http\ResponseGET /minn-admin/v1/boot-status (floor edit_posts)#

The app's one-round-trip boot burst. Absent sections are the contract's own fallback: the client loads a missing section standalone. The engine serves what it can honestly answer and omits the plugin-inventory sections it has no installation for.

Internals 1

Private and protected methods: how the class does its work. Not a contract; they change whenever the code is tidied.

privatecheckingReleases(Minn\Http\Response $response): Minn\Http\Response#

The answer, with the update service asked about Minn's releases after it is sent when the last check is a day old.