Property | Type | Description | |
---|---|---|---|
$_connection | Connection details | ||
$_dsn | |||
$_dsnParts | |||
$_format_date | Format for date columns, formatted for PHP's date() function | ||
$_format_datetime | |||
$_format_time | |||
$_options |
Method | Description | |
---|---|---|
__construct ( mixed $dsn, array $options = [] ) | ||
date ( $format = null ) : object | Get date | |
dateFormat ( ) : string | Get database format | |
dateTime ( $format = null ) : object | Get datetime | |
dateTimeFormat ( ) : string | Get database format | |
parseDSN ( string $dsn ) : array | Taken from PHPUnit 3.4: | |
time ( $format = null ) : object | Get database time format | |
timeFormat ( ) : string | Get database time format |
Method | Description | |
---|---|---|
dateTimeObject ( $format ) : DateTime | Turn formstted date into timestamp Also handles input timestamps |
public __construct ( mixed $dsn, array $options = [] ) | ||
$dsn | mixed | DSN string or pre-existing Mongo object |
$options | array |
public dateFormat ( ) : string | ||
return | string | Date format for PHP's date() function |
public dateTimeFormat ( ) : string | ||
return | string | DateTime format for PHP's date() function |
protected dateTimeObject ( $format ) : DateTime | ||
return | DateTime | object |
public static parseDSN ( string $dsn ) : array | ||
$dsn | string | Data Source Name to be parsed |
return | array | an associative array with the following keys: + adapter: Database backend used in PHP (mysql, odbc etc.) + dbsyntax: Database used with regards to SQL syntax etc. + protocol: Communication protocol to use (tcp, unix etc.) + host: Host specification (hostname[:port]) + database: Database to use on the DBMS server + username: User name for login + password: Password for login |
public timeFormat ( ) : string | ||
return | string | Time format for PHP's date() function |
protected $_format_date |