← DocumentationData & services · php

Core and Base database access

Select the connection manager for PDO, MySQLi, SQLSRV or ODBC.

01

Connection factory

Database settings determine which manager is instantiated while the project keeps a common service boundary.

02

Driver choice

PDO covers portable SQL access; native MySQLi, SQLSRV and ODBC managers address system-specific requirements.

03

Visual result

Examples are deterministic previews. PHP and shell code is never executed in the browser or on the public server.

php
$database = new Database(
    $settings->getRootSettings(RootSettings::DBCONNECT)
);

$factory = $database->getInstance('primary');
$manager = $factory?->dbm();

$entities = (new RegistService())
    ->registEntities('primary', $mapper);
Visual result deterministic

Core and Base database access

Manager
PDO / MySQLi / SQLSRV / ODBC
Connection
primary
Result
Typed rows