Menu

## Connection
in package
implements DatabaseDriverInterface

Connection.php : 10

### Table of Contents

#### Interfaces

DatabaseDriverInterface

#### Properties

$application : PioniaApplication|null
$dsn : string|null
$logging : bool
$pdo : PDO|null
$prefix : string|null
$testMode : bool
$type : string

#### Methods

connect() : static
  Establishes the database connection
getApplication() : PioniaApplication|null
  Returns the application instance
getDsn() : string|null
  Returns the DSN
getPdo() : PDO|null
  Returns the PDO instance
getPrefix() : string|null
  Returns the database table prefix we should use
getType() : string
  Returns the database type we are connecting to
isLogging() : bool
  Tell the core if we should log queries
isTestMode() : bool
  Sets whether we are in test mode
setApplication() : void
setDsn() : void
setLogging() : void
setPdo() : void
setPrefix() : void
setTestMode() : void
setType() : void
__construct() : mixed

### Properties

#### $application

Connection.php : 12
`protected PioniaApplication|null $application`

#### $dsn

Connection.php : 16
`protected string|null $dsn = null`

#### $logging

Connection.php : 24
`protected bool $logging = false`

#### $pdo

Connection.php : 14
`protected PDO|null $pdo`

#### $prefix

Connection.php : 20
`protected string|null $prefix = null`

#### $testMode

Connection.php : 22
`protected bool $testMode = false`

#### $type

Connection.php : 18
`protected string $type = 'mysql'`

### Methods

#### connect()

Connection.php : 396

Establishes the database connection

`public static connect(PioniaApplication|null $application[, null|string|array<string|int, mixed>|PDO $connection = 'default' ]) : static`

##### Parameters

$application : PioniaApplication|null
$connection : null|string|array<string|int, mixed>|PDO = 'default'

##### Return values

static

#### getApplication()

Connection.php : 326

Returns the application instance

`public getApplication() : PioniaApplication|null`

##### Return values

PioniaApplication|null

#### getDsn()

Connection.php : 346

Returns the DSN

`public getDsn() : string|null`

##### Return values

string|null

#### getPdo()

Connection.php : 336

Returns the PDO instance

`public getPdo() : PDO|null`

##### Return values

PDO|null

#### getPrefix()

Connection.php : 366

Returns the database table prefix we should use

`public getPrefix() : string|null`

##### Return values

string|null

#### getType()

Connection.php : 356

Returns the database type we are connecting to

`public getType() : string`

##### Return values

string

#### isLogging()

Connection.php : 386

Tell the core if we should log queries

`public isLogging() : bool`

##### Return values

bool

#### isTestMode()

Connection.php : 376

Sets whether we are in test mode

`public isTestMode() : bool`

##### Return values

bool

#### setApplication()

Connection.php : 331
`public setApplication(PioniaApplication|null $application) : void`

##### Parameters

$application : PioniaApplication|null

#### setDsn()

Connection.php : 351
`public setDsn(string $dsn) : void`

##### Parameters

$dsn : string

#### setLogging()

Connection.php : 391
`public setLogging(bool $logging) : void`

##### Parameters

$logging : bool

#### setPdo()

Connection.php : 341
`public setPdo(PDO|null $pdo) : void`

##### Parameters

$pdo : PDO|null

#### setPrefix()

Connection.php : 371
`public setPrefix(string $prefix) : void`

##### Parameters

$prefix : string

#### setTestMode()

Connection.php : 381
`public setTestMode(bool $testMode) : void`

##### Parameters

$testMode : bool

#### setType()

Connection.php : 361
`public setType(string $type) : void`

##### Parameters

$type : string

#### __construct()

Connection.php : 27
`private __construct(PioniaApplication|null $application[, null|string|array<string|int, mixed>|PDO $connection = 'default' ]) : mixed`

##### Parameters

$application : PioniaApplication|null
$connection : null|string|array<string|int, mixed>|PDO = 'default'

## Search results