PHP Класс Redaxscript\Db

С версии: 2.2.0
Автор: Henry Ruhs
Наследование: extends OR\ORM
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_config object instance of the config class

Открытые методы

Метод Описание
construct ( Config $config ) constructor of the class
countTablePrefix ( ) : Db count table with prefix
findFlatArray ( string $key = 'id' ) : array find a flat array
forTablePrefix ( string $table = null, string $connection = self::DEFAULT_CONNECTION ) : Db for table with prefix
getSetting ( string $key = null ) : mixed get the setting
getStatus ( ) : integer get the database status
init ( ) init the class
leftJoinPrefix ( string $table = null, string $constraint = null, string $tableAlias = null ) : Db left join with prefix
limitGlobal ( ) : Db limit according to global setting
orderGlobal ( string $column = null ) : Db order according to global setting
rawInstance ( ) : Db raw instance helper
setSetting ( string $key = null, string $value = null ) : boolean set the setting
whereLanguageIs ( array $language = null ) : Db where language is
whereLikeMany ( array $columnArray = null, array $likeArray = null ) : Db where like with many

Описание методов

construct() публичный статический Метод

constructor of the class
С версии: 2.6.0
public static construct ( Config $config )
$config Config instance of the config class

countTablePrefix() публичный статический Метод

count table with prefix
С версии: 2.4.0
public static countTablePrefix ( ) : Db
Результат Db

findFlatArray() публичный Метод

find a flat array
С версии: 3.0.0
public findFlatArray ( string $key = 'id' ) : array
$key string key of the item
Результат array

forTablePrefix() публичный статический Метод

for table with prefix
С версии: 2.2.0
public static forTablePrefix ( string $table = null, string $connection = self::DEFAULT_CONNECTION ) : Db
$table string name of the table
$connection string which connection to use
Результат Db

getSetting() публичный Метод

get the setting
С версии: 3.0.0
public getSetting ( string $key = null ) : mixed
$key string key of the item
Результат mixed

getStatus() публичный статический Метод

get the database status
С версии: 2.4.0
public static getStatus ( ) : integer
Результат integer

init() публичный статический Метод

init the class
С версии: 2.6.0
public static init ( )

leftJoinPrefix() публичный Метод

left join with prefix
С версии: 2.2.0
public leftJoinPrefix ( string $table = null, string $constraint = null, string $tableAlias = null ) : Db
$table string name of the table
$constraint string constraint as needed
$tableAlias string alias of the table
Результат Db

limitGlobal() публичный Метод

limit according to global setting
С версии: 2.2.0
public limitGlobal ( ) : Db
Результат Db

orderGlobal() публичный Метод

order according to global setting
С версии: 2.2.0
public orderGlobal ( string $column = null ) : Db
$column string name of the column
Результат Db

rawInstance() публичный статический Метод

raw instance helper
С версии: 2.4.0
public static rawInstance ( ) : Db
Результат Db

setSetting() публичный Метод

set the setting
С версии: 3.0.0
public setSetting ( string $key = null, string $value = null ) : boolean
$key string key of the item
$value string value of the item
Результат boolean

whereLanguageIs() публичный Метод

where language is
С версии: 3.0.0
public whereLanguageIs ( array $language = null ) : Db
$language array value of the language
Результат Db

whereLikeMany() публичный Метод

where like with many
С версии: 3.0.0
public whereLikeMany ( array $columnArray = null, array $likeArray = null ) : Db
$columnArray array array of column names
$likeArray array array of the like
Результат Db

Описание свойств

$_config защищенное статическое свойство

instance of the config class
protected static object $_config
Результат object