class StaticArray (View source)

Class StaticArray Provides methods to create database connections for various database engines.

Methods:

  • nativeMySQLi(array $env, bool $persistent = false, bool $strategy = false): Connection|MySQLiConnection: Creates a native MySQLi connection.
  • nativePgSQL(array $env, bool $persistent = false, bool $strategy = false): Connection|PgSQLConnection: Creates a native PostgreSQL connection.
  • nativeSQLSrv(array $env, bool $persistent = false, bool $strategy = false): Connection|SQLSrvConnection: Creates a native SQL Server connection.
  • nativeOCI(array $env, bool $persistent = false, bool $strategy = false): Connection|OCIConnection: Creates a native Oracle OCI connection.
  • nativeFirebird(array $env, bool $persistent = false, bool $strategy = false): Connection|FirebirdConnection: Creates a native Firebird connection.
  • nativeSQLite(array $env, bool $persistent = false, bool $strategy = false): Connection|SQLiteConnection: Creates a native SQLite connection.
  • nativeMemory(array $env, bool $persistent = false, bool $strategy = false): Connection|SQLiteConnection: Creates a native SQLite in-memory connection.
  • pdoMySQL(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection: Creates a PDO MySQL connection.
  • pdoPgSQL(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection: Creates a PDO PostgreSQL connection.
  • pdoSQLSrv(array $env, bool $strategy = false): Connection|PDOConnection: Creates a PDO SQL Server connection.
  • pdoOCI(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection: Creates a PDO Oracle OCI connection.
  • pdoFirebird(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection: Creates a PDO Firebird connection.
  • pdoSQLite(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection: Creates a PDO SQLite connection.
  • pdoMemory(array $env, bool $persistent = false, bool $strategy = false): Connection|PDOConnection:Creates a PDO SQLite in-memory connection.
  • odbcMySQL(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection:Creates an ODBC MySQL connection.
  • odbcPgSQL(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection:Creates an ODBC PostgreSQL connection.
  • odbcSQLSrv(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection:Creates an ODBC SQL Server connection.
  • odbcOCI(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection:Creates an ODBC Oracle OCI connection.
  • odbcFirebird(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC Firebird connection.
  • odbcSQLite(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC SQLite connection.
  • odbcAccess(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC Microsoft Access connection.
  • odbcExcel(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC Microsoft Excel connection.
  • odbcText(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC Text connection.
  • odbcMemory(array $env, bool $persistent = false, bool $strategy = false): Connection|ODBCConnection: Creates an ODBC SQLite in-memory connection.

Methods

static MySQLiConnection
nativeMySQLi(array $env, bool $persistent = false, bool $strategy = false)

Creates a native MySQLi connection using the provided environment settings.

static PgSQLConnection
nativePgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a native PgSQL connection using the provided environment settings.

static SQLSrvConnection
nativeSQLSrv(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLSrv connection using the provided environment settings.

static OCIConnection
nativeOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a native OCI connection using the provided environment settings.

static FirebirdConnection
nativeFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a native Firebird connection using the provided environment settings.

static SQLiteConnection
nativeSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLite connection using the provided environment settings.

static SQLiteConnection
nativeMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLite in-memory connection using the provided environment settings.

static PDOConnection
pdoMySQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO MySQL connection using the provided environment settings.

static PDOConnection
pdoPgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO PgSQL connection using the provided environment settings.

static PDOConnection
pdoSQLSrv(array $env, bool $strategy = false)

Creates a PDO SQLSrv connection using the provided environment settings.

static PDOConnection
pdoOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO OCI connection using the provided environment settings.

static PDOConnection
pdoFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO Firebird connection using the provided environment settings.

static PDOConnection
pdoSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO SQLite connection using the provided environment settings.

static PDOConnection
pdoMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO SQLite in-memory connection using the provided environment settings.

static ODBCConnection
odbcMySQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC MySQL connection using the provided environment settings.

static ODBCConnection
odbcPgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC PgSQL connection using the provided environment settings.

static ODBCConnection
odbcSQLSrv(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC SQLSrv connection using the provided environment settings.

static ODBCConnection
odbcOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC OCI connection using the provided environment settings.

static ODBCConnection
odbcFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Firebird connection using the provided environment settings.

static ODBCConnection
odbcSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC SQLite connection using the provided environment settings.

static ODBCConnection
odbcAccess(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Access connection using the provided environment settings.

static ODBCConnection
odbcExcel(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Excel connection using the provided environment settings.

static ODBCConnection
odbcText(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Text connection using the provided environment settings.

static ODBCConnection
odbcMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Memory connection using the provided environment settings.

Details

static MySQLiConnection nativeMySQLi(array $env, bool $persistent = false, bool $strategy = false)

Creates a native MySQLi connection using the provided environment settings.

Parameters

array $env

An associative array containing MySQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

MySQLiConnection

Returns a MySQLi connection instance.

static PgSQLConnection nativePgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a native PgSQL connection using the provided environment settings.

Parameters

array $env

An associative array containing PgSQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PgSQLConnection

Returns a PgSQL connection instance.

static SQLSrvConnection nativeSQLSrv(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLSrv connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLSrv connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

SQLSrvConnection

Returns a SQLSrv connection instance.

static OCIConnection nativeOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a native OCI connection using the provided environment settings.

Parameters

array $env

An associative array containing OCI connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

OCIConnection

Returns a OCI connection instance.

static FirebirdConnection nativeFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a native Firebird connection using the provided environment settings.

Parameters

array $env

An associative array containing Firebird connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

FirebirdConnection

Returns a Firebird connection instance.

static SQLiteConnection nativeSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLite connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLite connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

SQLiteConnection

Returns a SQLite connection instance.

static SQLiteConnection nativeMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a native SQLite in-memory connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLite connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

SQLiteConnection

Returns a SQLite connection instance.

static PDOConnection pdoMySQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO MySQL connection using the provided environment settings.

Parameters

array $env

An associative array containing MySQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a MySQL connection instance.

static PDOConnection pdoPgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO PgSQL connection using the provided environment settings.

Parameters

array $env

An associative array containing PgSQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a PgSQL connection instance.

static PDOConnection pdoSQLSrv(array $env, bool $strategy = false)

Creates a PDO SQLSrv connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLSrv connection parameters.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a SQLSrv connection instance.

static PDOConnection pdoOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO OCI connection using the provided environment settings.

Parameters

array $env

An associative array containing OCI connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a OCI connection instance.

static PDOConnection pdoFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO Firebird connection using the provided environment settings.

Parameters

array $env

An associative array containing Firebird connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a Firebird connection instance.

static PDOConnection pdoSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO SQLite connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLite connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a SQLite connection instance.

static PDOConnection pdoMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a PDO SQLite in-memory connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLite connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

PDOConnection

Returns a SQLite connection instance.

static ODBCConnection odbcMySQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC MySQL connection using the provided environment settings.

Parameters

array $env

An associative array containing MySQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a MySQL connection instance.

static ODBCConnection odbcPgSQL(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC PgSQL connection using the provided environment settings.

Parameters

array $env

An associative array containing PgSQL connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a PgSQL connection instance.

static ODBCConnection odbcSQLSrv(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC SQLSrv connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLSrv connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a SQLSrv connection instance.

static ODBCConnection odbcOCI(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC OCI connection using the provided environment settings.

Parameters

array $env

An associative array containing OCI connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a OCI connection instance.

static ODBCConnection odbcFirebird(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Firebird connection using the provided environment settings.

Parameters

array $env

An associative array containing Firebird connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a Firebird connection instance.

static ODBCConnection odbcSQLite(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC SQLite connection using the provided environment settings.

Parameters

array $env

An associative array containing SQLite connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a SQLite connection instance.

static ODBCConnection odbcAccess(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Access connection using the provided environment settings.

Parameters

array $env

An associative array containing Access connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a Access connection instance.

static ODBCConnection odbcExcel(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Excel connection using the provided environment settings.

Parameters

array $env

An associative array containing Excel connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a Excel connection instance.

static ODBCConnection odbcText(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Text connection using the provided environment settings.

Parameters

array $env

An associative array containing Text connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a Text connection instance.

static ODBCConnection odbcMemory(array $env, bool $persistent = false, bool $strategy = false)

Creates a ODBC Memory connection using the provided environment settings.

Parameters

array $env

An associative array containing ODBC Memory connection parameters.

bool $persistent

Optional. Whether to use a persistent connection. Default is false.

bool $strategy

Optional. Whether to use a generic connection strategy. Default is false.

Return Value

ODBCConnection

Returns a ODBC Memory connection instance.