\nre\driversDatabaseDriver

Abstract class for implementing a database driver.

Summary

Methods
Properties
Constants
load()
factory()
singleton()
No public properties found
No constants found
__construct()
connect()
$driver
$connection
N/A
getClassName()
No private properties found
N/A

Properties

$connection

$connection : resource

Connection resource

Type

resource

Methods

load()

load(string  $driverName) 

Load the class of a Driver.

Parameters

string $driverName

Name of the Driver to load

Throws

\nre\exceptions\DriverNotFoundException
\nre\exceptions\DriverNotValidException

factory()

factory(string  $driverName, array  $config) 

Instantiate a Driver (Factory Pattern).

Parameters

string $driverName

Name of the Driver to instantiate

array $config

Configuration settings

singleton()

singleton(array  $config) : \nre\drivers\DatabaseDriver

Singleton-pattern.

Parameters

array $config

Database driver configuration

Returns

\nre\drivers\DatabaseDriver

Singleton-instance of database driver class

__construct()

__construct(array  $config) 

Construct a new database driver.

Parameters

array $config

Connection and login settings

connect()

connect(array  $config) 

Establish a connect to a MqSQL-database.

Parameters

array $config

Connection and login settings

Throws

\nre\exceptions\DatamodelException

getClassName()

getClassName(string  $driverName) : string

Determine the classname for the given Driver name.

Parameters

string $driverName

Driver name to get classname of

Returns

string —

Classname fore the Driver name