Property | Type | Description | |
---|---|---|---|
$_connected | boolean | Boolean indicating whether or not we're connected to the SQL server. | |
$_db | DB | Handle for the current database connection. | |
$_params | array | Hash containing connection parameters. | |
$_write_db | DB | Handle for the current database connection, used for writing. Defaults to the same handle as $_db if a separate write database is not required. |
Method | Description | |
---|---|---|
__construct ( array $params = [] ) | Constructs a new SQL storage object. | |
getAccountCodes ( ) |
Method | Description | |
---|---|---|
_connect ( ) : boolean | Attempts to open a connection to the SQL server. | |
_disconnect ( ) : boolean | Disconnects from the SQL server and cleans up the connection. | |
_getMonthlyCallStats ( $start, $end, $accountcode = null, $dcontext = null ) : array | Get summary call statistics per-month for a given time range, account and destination. | |
_getRecords ( $start, $end, $accountcode = null, $dcontext = null, $rowstart, $rowlimit = null ) : array | Get call detail records from the database |
public __construct ( array $params = [] ) | ||
$params | array | A hash containing connection parameters. |
protected _disconnect ( ) : boolean | ||
return | boolean | True on success, false on failure. |
protected _getMonthlyCallStats ( $start, $end, $accountcode = null, $dcontext = null ) : array | ||
return | array | Array of call statistics. The key of each element is the month name in date('Y-m') format and the value being an array of statistics for calls placed that month. |
protected _getRecords ( $start, $end, $accountcode = null, $dcontext = null, $rowstart, $rowlimit = null ) : array | ||
return | array | [0] contains summary statistics; [1] is an array of the actual call records. |
protected bool $_connected | ||
return | boolean |
protected array $_params | ||
return | array |