\Charcoal\App\ConfigDatabaseConfig

Database Config

Summary

Methods
Properties
Constants
defaults()
setType()
type()
setHostname()
hostname()
setUsername()
username()
setPassword()
password()
setDatabase()
database()
setDisableUtf8()
disableUtf8()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$type
$hostname
$username
$password
$database
$disableUtf8
N/A

Properties

$type

$type : string

Type

string

$hostname

$hostname : string

Type

string

$username

$username : string

Type

string

$password

$password : string

Type

string

$database

$database : string

Type

string

$disableUtf8

$disableUtf8 : boolean

Type

boolean

Methods

defaults()

defaults() : array

Returns

array

setType()

setType(string  $type) : \Charcoal\App\Config\SourceConfig

Parameters

string $type

The database type.

Throws

\InvalidArgumentException

If parameter is not a string.

Returns

\Charcoal\App\Config\SourceConfig —

Chainable

type()

type() : string

Returns

string

setHostname()

setHostname(string  $hostname) : \Charcoal\App\Config\DatabaseConfig

Set database hostname

Parameters

string $hostname

The database server hostname.

Throws

\InvalidArgumentException

If hostname is not a string.

Returns

\Charcoal\App\Config\DatabaseConfig

Chainable

hostname()

hostname() : string

Get database hostname.

Returns

string

setUsername()

setUsername(string  $username) : \Charcoal\App\Config\DatabaseConfig

Set database username

Parameters

string $username

The database authentication user.

Throws

\InvalidArgumentException

If username is not a string.

Returns

\Charcoal\App\Config\DatabaseConfig

Chainable

username()

username() : string

Get username

Returns

string

setPassword()

setPassword(string  $password) : \Charcoal\App\Config\DatabaseConfig

Set password

Parameters

string $password

The database authentication password.

Throws

\InvalidArgumentException

If password is not a string.

Returns

\Charcoal\App\Config\DatabaseConfig

Chainable

password()

password() : string

Get password

Returns

string

setDatabase()

setDatabase(string  $database) : \Charcoal\App\Config\DatabaseConfig

Set database

Parameters

string $database

The database name.

Throws

\InvalidArgumentException

If database is not a string.

Returns

\Charcoal\App\Config\DatabaseConfig

Chainable

database()

database() : string

Get database

Returns

string

setDisableUtf8()

setDisableUtf8(boolean  $disableUtf8) : \Charcoal\App\Config\DatabaseConfig

Parameters

boolean $disableUtf8

The "disable utf8" flag.

Returns

\Charcoal\App\Config\DatabaseConfig

Chainable

disableUtf8()

disableUtf8() : boolean

Returns

boolean