Documentation

Connect
in package

This is the main connection entry point and is responsible for establishing, maintaining and closing a PDO connection

Tags
author

Jason Napolitano

version
1.0.0
since
1.0.0
license

MIT https://mit-license.org

Table of Contents

$connection  : PDO
$database  : string
$driver  : string
$hostname  : string
$password  : string
$username  : string
connection()  : PDO
start()  : PDO
PDO connection instance
newConnection()  : void
Generate a new PDO connection
setDriver()  : void
Setter for the database driver

Properties

$connection

private static PDO $connection

PDO instance

$database

private static string $database

Database

$driver

private static string $driver

Database driver

$hostname

private static string $hostname

Hostname

$password

private static string $password

Password

$username

private static string $username

Username

Methods

connection()

public static connection() : PDO
Return values
PDO

start()

PDO connection instance

public static start() : PDO
Return values
PDO

newConnection()

Generate a new PDO connection

private static newConnection(string $string) : void
Parameters
$string : string
Return values
void

setDriver()

Setter for the database driver

private static setDriver([string|null $driver = null ]) : void
Parameters
$driver : string|null = null
Return values
void

Search results