PHP Class Lazer\Classes\Helpers\Config

Author: Grzegorz Kuźnik
Inheritance: extends File
ファイルを表示 Open project: greg0/lazer-database Class Usage Examples

Public Methods

Method Description
fields ( ) : array Return array with names of fields
getKey ( string $field, boolean $assoc = false ) : mixed Get key from returned config
lastId ( ) : integer Returning last ID from table
relations ( mixed $tableName = null, boolean $assoc = false ) : array | object Return relations configure
schema ( ) : array Returning assoc array with types of fields
table ( $name )

Method Details

fields() public method

Return array with names of fields
public fields ( ) : array
return array

getKey() public method

Get key from returned config
public getKey ( string $field, boolean $assoc = false ) : mixed
$field string key
$assoc boolean
return mixed

lastId() public method

Returning last ID from table
public lastId ( ) : integer
return integer

relations() public method

Return relations configure
public relations ( mixed $tableName = null, boolean $assoc = false ) : array | object
$tableName mixed null-all tables;array-few tables;string-one table relation informations
$assoc boolean Object or associative array
return array | object

schema() public method

Returning assoc array with types of fields
public schema ( ) : array
return array

table() public static method

public static table ( $name )