| 1 |
<?php |
| 2 |
|
| 3 |
if (!defined('ABSPATH')) { |
| 4 |
exit; |
| 5 |
} |
| 6 |
|
| 7 |
require_once __DIR__ . '/DatabaseTableNameResolver.php'; |
| 8 |
require_once __DIR__ . '/DatabaseCollationHelper.php'; |
| 9 |
|
| 10 |
/** |
| 11 |
* Database component-access contract for callers that need core-owned |
| 12 |
* collaborators. Query-only callers should depend on |
| 13 |
* ABJ_404_Solution_DatabaseQueryInterface instead. |
| 14 |
* |
| 15 |
* Runtime flags, plugin admin notices, and write-block detection live on |
| 16 |
* ABJ_404_Solution_DatabaseRuntimeStateInterface, implemented by |
| 17 |
* ABJ_404_Solution_DatabaseNoticeStateHolder. Reach them via |
| 18 |
* DatabaseCore::noticeState()->setRuntimeFlag(...) etc. |
| 19 |
* |
| 20 |
* The post-type/category SQL-list builders and SQL session preamble live on |
| 21 |
* ABJ_404_Solution_DatabaseQueryBuilderInterface, implemented by |
| 22 |
* ABJ_404_Solution_DatabaseTableNameResolver. Reach them via |
| 23 |
* DatabaseCore::tableNameResolver()->buildPostTypeSqlList(...) etc. |
| 24 |
* Table-name resolution, DDL introspection, existence checks, and column |
| 25 |
* listing also live on DatabaseTableNameResolver. Reach them through |
| 26 |
* DatabaseCore::tableNameResolver()->getPrefixedTableName(...) etc. |
| 27 |
* |
| 28 |
* Table and column collation lookup lives on DatabaseCollationHelper. Reach |
| 29 |
* it through DatabaseCore::collationHelper()->getColumnCollationString(...) |
| 30 |
* etc. |
| 31 |
* |
| 32 |
* Error classification, self-healing recovery, and clock injection live on |
| 33 |
* ABJ_404_Solution_DatabaseErrorRecoveryInterface, split across |
| 34 |
* DatabaseErrorClassifier (classifyAndHandleInfrastructureError, |
| 35 |
* isOutOfMemoryError via taxonomy()->hostState()), DatabaseTableRepairer |
| 36 |
* (repairTable, repairDuplicateIDs), and DatabaseCollationHelper |
| 37 |
* (scheduleCollationRecovery). Reach them via |
| 38 |
* DatabaseCore::errorClassifier()->...(), tableRepairer()->...(), and |
| 39 |
* collationHelper()->...(). Test clock injection goes through the |
| 40 |
* ServiceContainer 'clock' binding (see clock_injection_pattern.md). |
| 41 |
*/ |
| 42 |
interface ABJ_404_Solution_DatabaseCoreInterface { |
| 43 |
/** @return ABJ_404_Solution_DatabaseTableNameResolver */ |
| 44 |
public function tableNameResolver(): ABJ_404_Solution_DatabaseTableNameResolver; |
| 45 |
|
| 46 |
/** @return ABJ_404_Solution_DatabaseCollationHelper */ |
| 47 |
public function collationHelper(): ABJ_404_Solution_DatabaseCollationHelper; |
| 48 |
} |
| 49 |
|