PHP Class Redaxscript\Db

Since: 2.2.0
Author: Henry Ruhs
Inheritance: extends OR\ORM
Afficher le fichier Open project: redaxmedia/redaxscript Class Usage Examples

Protected Properties

Свойство Type Description
$_config object instance of the config class

Méthodes publiques

Méthode Description
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

Method Details

construct() public static méthode

constructor of the class
Since: 2.6.0
public static construct ( Config $config )
$config Config instance of the config class

countTablePrefix() public static méthode

count table with prefix
Since: 2.4.0
public static countTablePrefix ( ) : Db
Résultat Db

findFlatArray() public méthode

find a flat array
Since: 3.0.0
public findFlatArray ( string $key = 'id' ) : array
$key string key of the item
Résultat array

forTablePrefix() public static méthode

for table with prefix
Since: 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
Résultat Db

getSetting() public méthode

get the setting
Since: 3.0.0
public getSetting ( string $key = null ) : mixed
$key string key of the item
Résultat mixed

getStatus() public static méthode

get the database status
Since: 2.4.0
public static getStatus ( ) : integer
Résultat integer

init() public static méthode

init the class
Since: 2.6.0
public static init ( )

leftJoinPrefix() public méthode

left join with prefix
Since: 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
Résultat Db

limitGlobal() public méthode

limit according to global setting
Since: 2.2.0
public limitGlobal ( ) : Db
Résultat Db

orderGlobal() public méthode

order according to global setting
Since: 2.2.0
public orderGlobal ( string $column = null ) : Db
$column string name of the column
Résultat Db

rawInstance() public static méthode

raw instance helper
Since: 2.4.0
public static rawInstance ( ) : Db
Résultat Db

setSetting() public méthode

set the setting
Since: 3.0.0
public setSetting ( string $key = null, string $value = null ) : boolean
$key string key of the item
$value string value of the item
Résultat boolean

whereLanguageIs() public méthode

where language is
Since: 3.0.0
public whereLanguageIs ( array $language = null ) : Db
$language array value of the language
Résultat Db

whereLikeMany() public méthode

where like with many
Since: 3.0.0
public whereLikeMany ( array $columnArray = null, array $likeArray = null ) : Db
$columnArray array array of column names
$likeArray array array of the like
Résultat Db

Property Details

$_config protected_oe static_oe property

instance of the config class
protected static object $_config
Résultat object