Dbwrapper Uses Container, DbTool, Prefix, Zend
Class for access to data base.
Tags
Table of Contents
- $adapter : mixed
- $affectedRows : mixed
- $connection : mixed
- $errorInfo : mixed
- $generatedValue : mixed
- $lotgdKernel : mixed
- $lotgdKernelContainer : mixed
- $prefix : string
- Prefix used foPrefix used by tables.
- $queriesthishit : mixed
- $querytime : mixed
- $serviceManager : mixed
- $sql : mixed
- $sqlString : mixed
- __construct() : $this
- Configure adapter for DB.
- connect() : bool
- Check connection to DB.
- count() : int
- current() : mixed
- delete() : object
- Delete API.
- errorInfo() : mixed
- Get error of connection.
- execute() : ResultSet
- Execute a object type SQL.
- expression() : mixed
- Create Laminas\Db\Sql\Predicate\Expression for uses in Zend DB.
- getAdapter() : Adapter
- Get adapter for DB.
- getAffectedRows() : int
- getContainer() : object
- Get container.
- getGeneratedValue() : mixed
- getKernel() : Kernel
- Get LoTGD Kernel.
- getPrefix() : string
- Get the value of prefix.
- getQueriesThisHit() : int
- getQueryTime() : float
- getServerName() : string
- Check name of data base.
- getService() : mixed
- Get container.
- getSql() : string
- Get a sql query string.
- insert() : object
- Insert API.
- paginator() : object|Paginator
- Generate a paginator query.
- prefix() : string|array<string|int, mixed>
- Prefix for tables.
- query() : ResultSet
- Execute a query.
- quoteValue() : string
- Quote value for safe using in DB.
- select() : object
- Select API.
- setContainer() : mixed
- Set container (Service Manager).
- setPrefix() : self
- Set the value of prefix.
- sql() : mixed
- update() : object
- Update API.
Properties
$adapter
protected
mixed
$adapter
$affectedRows
protected
mixed
$affectedRows
= 0
$connection
protected
mixed
$connection
$errorInfo
protected
mixed
$errorInfo
$generatedValue
protected
mixed
$generatedValue
$lotgdKernel
protected
mixed
$lotgdKernel
$lotgdKernelContainer
protected
mixed
$lotgdKernelContainer
$prefix
Prefix used foPrefix used by tables.
protected
string
$prefix
= ''
$queriesthishit
protected
mixed
$queriesthishit
= 0
$querytime
protected
mixed
$querytime
= 0
$serviceManager
protected
mixed
$serviceManager
$sql
protected
mixed
$sql
$sqlString
protected
mixed
$sqlString
Methods
__construct()
Configure adapter for DB.
public
__construct(array<string|int, mixed> $options[, bool $force = null ]) : $this
Parameters
- $options : array<string|int, mixed>
- $force : bool = null
Return values
$this —connect()
Check connection to DB.
public
connect() : bool
Return values
bool —count()
public
static count(mixed $result) : int
Parameters
- $result : mixed
Return values
int —current()
public
static current(mixed &$result) : mixed
Parameters
- $result : mixed
Return values
mixed —delete()
Delete API.
public
delete([string|TableIdentifier|null $table = null ][, bool $prefixed = null ]) : object
Parameters
- $table : string|TableIdentifier|null = null
- $prefixed : bool = null
Return values
object —errorInfo()
Get error of connection.
public
errorInfo([object $result = null ]) : mixed
Parameters
- $result : object = null
Return values
mixed —execute()
Execute a object type SQL.
public
execute(object $object) : ResultSet
Parameters
- $object : object
Return values
ResultSet —expression()
Create Laminas\Db\Sql\Predicate\Expression for uses in Zend DB.
public
expression([string $expresion = null ]) : mixed
Parameters
- $expresion : string = null
Return values
mixed —getAdapter()
Get adapter for DB.
public
getAdapter() : Adapter
Return values
Adapter —getAffectedRows()
public
getAffectedRows([mixed $result = null ]) : int
Parameters
- $result : mixed = null
Return values
int —getContainer()
Get container.
public
getContainer([string $name = null ]) : object
Parameters
- $name : string = null
Tags
Return values
object —getGeneratedValue()
public
getGeneratedValue() : mixed
Return values
mixed —getKernel()
Get LoTGD Kernel.
public
getKernel() : Kernel
Return values
Kernel —getPrefix()
Get the value of prefix.
public
getPrefix() : string
Return values
string —getQueriesThisHit()
public
getQueriesThisHit() : int
Return values
int —getQueryTime()
public
getQueryTime() : float
Return values
float —getServerName()
Check name of data base.
public
getServerName() : string
Return values
string —getService()
Get container.
public
getService(string $name) : mixed
Parameters
- $name : string
Return values
mixed —getSql()
Get a sql query string.
public
getSql() : string
Return values
string —insert()
Insert API.
public
insert([string|TableIdentifier|null $table = null ][, bool $prefixed = null ]) : object
Parameters
- $table : string|TableIdentifier|null = null
- $prefixed : bool = null
Return values
object —paginator()
Generate a paginator query.
public
paginator(Select $select[, int $page = 1 ][, int $perpage = 25 ]) : object|Paginator
Parameters
- $select : Select
- $page : int = 1
- $perpage : int = 25
Return values
object|Paginator —prefix()
Prefix for tables.
public
prefix(string|array<string|int, mixed> $tablename[, false|string $force = false ]) : string|array<string|int, mixed>
Parameters
- $tablename : string|array<string|int, mixed>
-
Name of table
- $force : false|string = false
-
If you want to force a prefix
Return values
string|array<string|int, mixed> —query()
Execute a query.
public
query(string $sql) : ResultSet
Parameters
- $sql : string
Return values
ResultSet —quoteValue()
Quote value for safe using in DB.
public
quoteValue(string $value) : string
Parameters
- $value : string
Return values
string —select()
Select API.
public
select([string|array<string|int, mixed>|TableIdentifier|null $table = null ][, bool $prefixed = null ]) : object
Parameters
- $table : string|array<string|int, mixed>|TableIdentifier|null = null
- $prefixed : bool = null
Return values
object —setContainer()
Set container (Service Manager).
public
setContainer(ContainerInterface $container) : mixed
Parameters
- $container : ContainerInterface
Tags
Return values
mixed —setPrefix()
Set the value of prefix.
public
setPrefix(string $prefix) : self
Parameters
- $prefix : string
Return values
self —sql()
public
sql() : mixed
Return values
mixed —update()
Update API.
public
update([string|TableIdentifier|null $table = null ][, bool $prefixed = null ]) : object
Parameters
- $table : string|TableIdentifier|null = null
- $prefixed : bool = null