RedBeanDatabase Class Reference

Static Public Member Functions

static setup ($dsn, $username, $password)
static isSetup ()
static close ()
static getDatabaseType ()
static freeze ()
static isFrozen ()
static unfreeze ()
static getDatabaseTypeFromDsnString ($dsn)
static getDatabaseInfoFromDsnString ($dsn)
static getDatabaseNameFromDsnString ($dsn)

Detailed Description

Abstraction over the top of an application database accessed via RedBean.

Definition at line 44 of file RedBeanDatabase.php.


Member Function Documentation

static setup ( dsn,
username,
password 
) [static]

Sets up the database connection.

Parameters:
$dsn The datasource name. See: http://nl3.php.net/manual/en/pdo.construct.php

   "sqlite:database.txt"
   "mysql:host=localhost;dbname=oodb"
   "pgsql:host=localhost;dbname=oodb"
$username The database user's login username.
$password The database user's login password.

Definition at line 60 of file RedBeanDatabase.php.

static isSetup (  )  [static]

Returns true if the setup() method has been called.

Definition at line 105 of file RedBeanDatabase.php.

static freeze (  )  [static]

Freezes the database. This means there is no need for RedBean to create any more tables or modify table structures. This boosts the performance of the application significantly.

Definition at line 139 of file RedBeanDatabase.php.

static isFrozen (  )  [static]

Returns true if the database is frozen.

Definition at line 147 of file RedBeanDatabase.php.

static unfreeze (  )  [static]

Unfreezes the database. This means that RedBean can dynamically modify the database as it executes during development.

Definition at line 156 of file RedBeanDatabase.php.

static getDatabaseTypeFromDsnString ( dsn  )  [static]

Get database type from connection string(dsn)

Parameters:
string $dsn
Exceptions:
NotSupportedException 

Definition at line 166 of file RedBeanDatabase.php.

static getDatabaseInfoFromDsnString ( dsn  )  [static]
Parameters:
string $dsn
Exceptions:
NotSupportedException 
Returns:
multitype:array

Definition at line 185 of file RedBeanDatabase.php.

static getDatabaseNameFromDsnString ( dsn  )  [static]

Get database name from connection string Function allow two connection formats because backward compatibility 1. "host=localhost;port=3306;dbname=zurmo" 2. "host=localhost;dbname=zurmo"

Parameters:
string $dsn
Exceptions:
NotSupportedException 
Returns:
string

Definition at line 222 of file RedBeanDatabase.php.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables
Generated on Tue Mar 28 07:10:28 2017