Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • CacheConfig
  • DatabaseConfig
  • FilesystemConfig
  • LoggerConfig
  • MemcacheCacheConfig
  • MemcacheCacheServerConfig
  • Overview
  • Namespace
  • Class

Class DatabaseConfig

Database Config

Charcoal\Config\AbstractConfig
Extended by Charcoal\App\Config\DatabaseConfig
Namespace: Charcoal\App\Config
Located at Charcoal/App/Config/DatabaseConfig.php
Methods summary
public array
# defaults( )

Returns

array
public SourceConfig
# setType( string $type )

Parameters

$type
The database type.

Returns

SourceConfig
Chainable

Throws

InvalidArgumentException
If parameter is not a string.
public string
# type( )

Returns

string
public Charcoal\App\Config\DatabaseConfig
# setHostname( string $hostname )

Set database hostname

Set database hostname

Parameters

$hostname
The database server hostname.

Returns

Charcoal\App\Config\DatabaseConfig
Chainable

Throws

InvalidArgumentException
If hostname is not a string.
public string
# hostname( )

Get database hostname.

Get database hostname.

Returns

string
public Charcoal\App\Config\DatabaseConfig
# setUsername( string $username )

Set database username

Set database username

Parameters

$username
The database authentication user.

Returns

Charcoal\App\Config\DatabaseConfig
Chainable

Throws

InvalidArgumentException
If username is not a string.
public string
# username( )

Get username

Get username

Returns

string
public Charcoal\App\Config\DatabaseConfig
# setPassword( string $password )

Set password

Set password

Parameters

$password
The database authentication password.

Returns

Charcoal\App\Config\DatabaseConfig
Chainable

Throws

InvalidArgumentException
If password is not a string.
public string
# password( )

Get password

Get password

Returns

string
public Charcoal\App\Config\DatabaseConfig
# setDatabase( string $database )

Set database

Set database

Parameters

$database
The database name.

Returns

Charcoal\App\Config\DatabaseConfig
Chainable

Throws

InvalidArgumentException
If database is not a string.
public string
# database( )

Get database

Get database

Returns

string
public Charcoal\App\Config\DatabaseConfig
# setDisableUtf8( boolean $disableUtf8 )

Parameters

$disableUtf8
The "disable utf8" flag.

Returns

Charcoal\App\Config\DatabaseConfig
Chainable
public boolean
# disableUtf8( )

Returns

boolean
API documentation generated by ApiGen