PHP Class Devise\Support\Installer\DatabaseCreator

Datei anzeigen Open project: devisephp/cms Class Usage Examples

Protected Properties

Property Type Description
$connection PDO .. ...you suck connection... ...see... ... I mock you!

Public Methods

Method Description
__construct ( PDO $connection = null ) Create a new database creator
createDatabase ( string $driver, string $host, string $database, string $username, string $password ) : void Create a new database from given settings

Protected Methods

Method Description
connection ( string $driver, string $host, string $username, string $password ) : PDO Creates a new connection for given driver and also constructs a generic dsn
findPdoConnection ( string $driver, string $host, string $username, string $password ) : PDO Creates a PDO connection for us

Method Details

__construct() public method

Create a new database creator
public __construct ( PDO $connection = null )
$connection PDO

connection() protected method

Creates a new connection for given driver and also constructs a generic dsn
protected connection ( string $driver, string $host, string $username, string $password ) : PDO
$driver string
$host string
$username string
$password string
return PDO

createDatabase() public method

Create a new database from given settings
public createDatabase ( string $driver, string $host, string $database, string $username, string $password ) : void
$driver string
$host string
$database string
$username string
$password string
return void

findPdoConnection() protected method

Creates a PDO connection for us
protected findPdoConnection ( string $driver, string $host, string $username, string $password ) : PDO
$driver string
$host string
$username string
$password string
return PDO

Property Details

$connection protected_oe property

.. ...you suck connection... ...see... ... I mock you!
protected PDO $connection
return PDO