Shared MyAdmin\App\Contracts\* interfaces for the MyAdmin
billing/management platform, extracted from the core interserver/my repo so that the core and
every detain/myadmin-* module can depend on a single source of truth — and unit-test against these
contracts with fakes without pulling in the whole core.
| Interface | Purpose |
|---|---|
AccountsInterface |
Accounts abstraction (read/add/update/delete/cross_reference/exists/get_next_id). |
DatabaseInterface |
Abstraction over MyDb\Generic / MyDb\Mysqli\Db (query/next_record/num_rows/real_escape/getLastInsertId/qr/f). |
RequestContextInterface |
Per-request user/view state (ima/accountId/locale/language/theme/isAdmin). |
SessionInterface |
Session abstraction (verify/create/destroy/appsession/CSRF helpers). |
Namespace-preserving: the interfaces keep their original MyAdmin\App\Contracts\ namespace, so moving
them out of core requires no changes to the ~23 core consumers or to any module.
composer require detain/myadmin-contractsuse MyAdmin\App\Contracts\DatabaseInterface;
final class FakeDb implements DatabaseInterface
{
// ... implement the interface, return canned rows ...
}LGPL-2.1-only.