PHP Interface Fakerino\Core\Database\DbInterface

Author: Nicola Pietroluongo ([email protected])
Afficher le fichier Open project: fakerino/fakerino Interface Usage Examples

Méthodes publiques

Méthode Description
connect ( ) : boolean Makes a database connection.
getColumnLength ( integer $num ) : integer Returns the length of the $num column.
getColumnName ( integer $num ) : string Returns the name of the $num column.
getColumnType ( integer $num ) : string Returns the type of the $num column.
getFakeType ( string $columnType ) : string Gets the Fakerino columnType.
getTotalColumns ( ) : integer Gets the number of column in the table.
insert ( DbRowEntity $row ) : boolean Inserts row in $tableName.
isColumnAutoincrement ( integer $num ) : boolean Returns true if the column is autoincrement.
setTable ( string $tableName ) Sets the connection with the $tableName.

Method Details

connect() public méthode

Makes a database connection.
public connect ( ) : boolean
Résultat boolean

getColumnLength() public méthode

Returns the length of the $num column.
public getColumnLength ( integer $num ) : integer
$num integer
Résultat integer

getColumnName() public méthode

Returns the name of the $num column.
public getColumnName ( integer $num ) : string
$num integer
Résultat string mixed

getColumnType() public méthode

Returns the type of the $num column.
public getColumnType ( integer $num ) : string
$num integer
Résultat string

getFakeType() public méthode

Gets the Fakerino columnType.
public getFakeType ( string $columnType ) : string
$columnType string
Résultat string

getTotalColumns() public méthode

Gets the number of column in the table.
public getTotalColumns ( ) : integer
Résultat integer

insert() public méthode

Inserts row in $tableName.
public insert ( DbRowEntity $row ) : boolean
$row DbRowEntity
Résultat boolean

isColumnAutoincrement() public méthode

Returns true if the column is autoincrement.
public isColumnAutoincrement ( integer $num ) : boolean
$num integer
Résultat boolean

setTable() public méthode

Sets the connection with the $tableName.
public setTable ( string $tableName )
$tableName string