Documentation

DB
in package

Class DB

Table of Contents

$_mHandler  : mixed
Close()  : mixed
Execute()  : bool
GetAll()  : array<string|int, mixed>|null
GetOne()  : mixed|null
GetRow()  : mixed|null
interpolateQuery()  : string
Replaces any parameter placeholders in a query with the value of that parameter. Useful for debugging. Assumes anonymous parameters from $params are are in the same order as specified in $query
showStatus()  : mixed
__construct()  : mixed
convertPersianWord()  : string|array<string|int, string>
convertPersianWords()  : mixed
GetHandler()  : PDO

Properties

$_mHandler

private static mixed $_mHandler

Methods

Close()

public static Close() : mixed
Return values
mixed

Execute()

public static Execute( $sqlQuery[, null $params = null ]) : bool
Parameters
$sqlQuery :
$params : null = null
Return values
bool

GetAll()

public static GetAll( $sqlQuery[, null $params = null ][, int $fetchStyle = PDO::FETCH_ASSOC ]) : array<string|int, mixed>|null
Parameters
$sqlQuery :
$params : null = null
$fetchStyle : int = PDO::FETCH_ASSOC
Return values
array<string|int, mixed>|null

GetOne()

public static GetOne( $sqlQuery[, null $params = null ]) : mixed|null
Parameters
$sqlQuery :
$params : null = null
Return values
mixed|null

GetRow()

public static GetRow( $sqlQuery[, null $params = null ][, int $fetchStyle = PDO::FETCH_ASSOC ]) : mixed|null
Parameters
$sqlQuery :
$params : null = null
$fetchStyle : int = PDO::FETCH_ASSOC
Return values
mixed|null

interpolateQuery()

Replaces any parameter placeholders in a query with the value of that parameter. Useful for debugging. Assumes anonymous parameters from $params are are in the same order as specified in $query

public static interpolateQuery([string $query = "" ][, array<string|int, mixed> $params = [] ]) : string
Parameters
$query : string = ""

The sql query with parameter placeholders

$params : array<string|int, mixed> = []

The array of substitution parameters

Return values
string

The interpolated query

showStatus()

public static showStatus() : mixed
Return values
mixed

__construct()

private __construct() : mixed
Return values
mixed

convertPersianWord()

private static convertPersianWord( $item) : string|array<string|int, string>
Parameters
$item :
Return values
string|array<string|int, string>

convertPersianWords()

private static convertPersianWords( $arrayParams) : mixed
Parameters
$arrayParams :
Return values
mixed

GetHandler()

private static GetHandler() : PDO
Return values
PDO

Search results