class Connection

Class Connection

Properties

protected LoggerInterface $logger
protected ApplicationPath $appPath
protected CacheDriverFactory $cacheDriverFactory
protected Connection $connection
protected string $appMode
protected array $connectionParams
protected string $prefix

Methods

__construct(LoggerInterface $logger, ApplicationPath $appPath, CacheDriverFactory $cacheDriverFactory, $appMode, array $connectionParams, $tablePrefix)

Connection constructor.

Connection
getConnection()

No description

string
getDatabase()

No description

string
getPrefix()

No description

string
getPrefixedTableName(string $tableName)

No description

array
fetchAll(string $statement, array $params = [], array $types = [], bool $cache = false, int $lifetime = 0, null $cacheKey = null)

No description

mixed
fetchArray(string $statement, array $params = [], array $types = [])

No description

mixed
fetchAssoc(string $statement, array $params = [], array $types = [])

No description

bool|string
fetchColumn(string $statement, array $params = [], int $column = 0, array $types = [])

No description

ResultStatement|Statement
executeQuery(string $query, array $params = [], array $types = [], bool $cache = false, int $lifetime = 0, null $cacheKey = null)

No description

bool|int
executeTransactionalQuery(callable $callback)

No description

connect()

No description

Details

at line 60
__construct(LoggerInterface $logger, ApplicationPath $appPath, CacheDriverFactory $cacheDriverFactory, $appMode, array $connectionParams, $tablePrefix)

Connection constructor.

Parameters

LoggerInterface $logger
ApplicationPath $appPath
CacheDriverFactory $cacheDriverFactory
$appMode
array $connectionParams
$tablePrefix

at line 81
Connection getConnection()

Return Value

Connection

at line 89
string getDatabase()

Return Value

string

at line 97
string getPrefix()

Return Value

string

at line 107
string getPrefixedTableName(string $tableName)

Parameters

string $tableName

Return Value

string

at line 122
array fetchAll(string $statement, array $params = [], array $types = [], bool $cache = false, int $lifetime = 0, null $cacheKey = null)

Parameters

string $statement
array $params
array $types
bool $cache
int $lifetime
null $cacheKey

Return Value

array

at line 144
mixed fetchArray(string $statement, array $params = [], array $types = [])

Parameters

string $statement
array $params
array $types

Return Value

mixed

at line 156
mixed fetchAssoc(string $statement, array $params = [], array $types = [])

Parameters

string $statement
array $params
array $types

Return Value

mixed

at line 169
bool|string fetchColumn(string $statement, array $params = [], int $column = 0, array $types = [])

Parameters

string $statement
array $params
int $column
array $types

Return Value

bool|string

at line 186
ResultStatement|Statement executeQuery(string $query, array $params = [], array $types = [], bool $cache = false, int $lifetime = 0, null $cacheKey = null)

Parameters

string $query
array $params
array $types
bool $cache
int $lifetime
null $cacheKey

Return Value

ResultStatement|Statement

Exceptions

CacheException
DBALException

at line 208
bool|int executeTransactionalQuery(callable $callback)

Parameters

callable $callback

Return Value

bool|int

Exceptions

ConnectionException

at line 228
protected connect()

Exceptions

DBALException