PluginProbe
404 Solution / 4.3.3
404 Solution v4.3.3
4.3.5 4.3.4 4.3.3 4.3.2 4.3.1 4.3.0 4.2.0 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.1.7 4.1.6 4.1.5 4.1.4 4.1.3 trunk 2.30.0 All 109 releases
404-solution / includes / database / DatabaseCoreInterface.php

DatabaseCoreInterface.php in 404 Solution 4.3.3, at includes/database/DatabaseCoreInterface.php

49 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
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