PHP Class Base\Base

Afficher le fichier Open project: erusev/base Class Usage Examples

Méthodes publiques

Свойство Type Description
$fkEnding string The ending of FK names.

Méthodes publiques

Méthode Description
__construct ( string $dsn, string $username = null, string $password = null, array $options = [] ) Takes the same parameters as the PDO constructor.
createItem ( string $table, array $Data ) : integer
deleteItem ( string $table, integer $id ) : integer
execute ( string $statement, array $parameters = [] ) : PDOStatemen\PDOStatement
find ( string $table ) : base\Collection
lastId ( ) : integer
pdo ( ) : PD\PDO
read ( string $statement, array $parameters = [] ) : array
readField ( string $statement, array $parameters = [] ) : array
readFields ( string $statement, array $parameters = [] ) : array
readItem ( string $table, integer $id ) : array
readRecord ( string $statement, array $parameters = [] ) : array
update ( string $statement, array $parameters = [] ) : integer
updateItem ( string $table, integer $id, array $Data ) : integer

Method Details

__construct() public méthode

Takes the same parameters as the PDO constructor.
public __construct ( string $dsn, string $username = null, string $password = null, array $options = [] )
$dsn string
$username string [optional]
$password string [optional]
$options array [optional]

createItem() public méthode

public createItem ( string $table, array $Data ) : integer
$table string
$Data array
Résultat integer

deleteItem() public méthode

public deleteItem ( string $table, integer $id ) : integer
$table string
$id integer
Résultat integer

execute() public méthode

public execute ( string $statement, array $parameters = [] ) : PDOStatemen\PDOStatement
$statement string
$parameters array
Résultat PDOStatemen\PDOStatement

find() public méthode

public find ( string $table ) : base\Collection
$table string
Résultat base\Collection

lastId() public méthode

public lastId ( ) : integer
Résultat integer

pdo() public méthode

public pdo ( ) : PD\PDO
Résultat PD\PDO

read() public méthode

public read ( string $statement, array $parameters = [] ) : array
$statement string
$parameters array
Résultat array

readField() public méthode

public readField ( string $statement, array $parameters = [] ) : array
$statement string
$parameters array
Résultat array

readFields() public méthode

public readFields ( string $statement, array $parameters = [] ) : array
$statement string
$parameters array
Résultat array

readItem() public méthode

public readItem ( string $table, integer $id ) : array
$table string
$id integer
Résultat array

readRecord() public méthode

public readRecord ( string $statement, array $parameters = [] ) : array
$statement string
$parameters array
Résultat array

update() public méthode

public update ( string $statement, array $parameters = [] ) : integer
$statement string
$parameters array
Résultat integer

updateItem() public méthode

public updateItem ( string $table, integer $id, array $Data ) : integer
$table string
$id integer
$Data array
Résultat integer

Property Details

$fkEnding public_oe property

The ending of FK names.
public string $fkEnding
Résultat string