PHP Class Pop\Db\Adapter\Pdo

Author: Nick Sagona, III ([email protected])
Inheritance: extends AbstractAdapter
Afficher le fichier Open project: nicksagona/PopPHP

Protected Properties

Свойство Type Description
$database string Database
$dbtype string PDO DB Type
$dsn string PDO DSN
$placeholder string Statement placeholder
$statement PDOStatement Prepared statement

Méthodes publiques

Méthode Description
__construct ( array $options ) : Pdo Constructor
bindParams ( array $params ) : Pdo Bind parameters to for a prepared SQL query.
disconnect ( ) : void Close the DB connection.
escape ( string $value ) : string Return the escaped string value.
execute ( ) : void Execute the prepared SQL query.
fetch ( ) : array Return the results array from the results resource.
fetchResult ( ) : array Fetch and return the values.
getDbtype ( ) : string Get PDO DB Type
getDsn ( ) : string Get PDO DSN
lastId ( ) : integer Return the auto-increment ID of the last query.
numFields ( ) : integer Return the number of fields in the result.
numRows ( ) : integer Return the number of rows in the result.
prepare ( string $sql, array $attribs = null ) : Pdo Prepare a SQL query.
query ( string $sql ) : void Execute the SQL query and create a result resource, or display the SQL error.
showError ( string $code = null, array $info = null ) : void Throw an exception upon a database error.
version ( ) : string Return the database version.

Méthodes protégées

Méthode Description
loadTables ( ) : array Get an array of the tables of the database.

Method Details

__construct() public méthode

Instantiate the PDO database connection object.
public __construct ( array $options ) : Pdo
$options array
Résultat Pdo

bindParams() public méthode

Bind parameters to for a prepared SQL query.
public bindParams ( array $params ) : Pdo
$params array
Résultat Pdo

disconnect() public méthode

Close the DB connection.
public disconnect ( ) : void
Résultat void

escape() public méthode

Return the escaped string value.
public escape ( string $value ) : string
$value string
Résultat string

execute() public méthode

Execute the prepared SQL query.
public execute ( ) : void
Résultat void

fetch() public méthode

Return the results array from the results resource.
public fetch ( ) : array
Résultat array

fetchResult() public méthode

Fetch and return the values.
public fetchResult ( ) : array
Résultat array

getDbtype() public méthode

Get PDO DB Type
public getDbtype ( ) : string
Résultat string

getDsn() public méthode

Get PDO DSN
public getDsn ( ) : string
Résultat string

lastId() public méthode

Return the auto-increment ID of the last query.
public lastId ( ) : integer
Résultat integer

loadTables() protected méthode

Get an array of the tables of the database.
protected loadTables ( ) : array
Résultat array

numFields() public méthode

Return the number of fields in the result.
public numFields ( ) : integer
Résultat integer

numRows() public méthode

Return the number of rows in the result.
public numRows ( ) : integer
Résultat integer

prepare() public méthode

Prepare a SQL query.
public prepare ( string $sql, array $attribs = null ) : Pdo
$sql string
$attribs array
Résultat Pdo

query() public méthode

Execute the SQL query and create a result resource, or display the SQL error.
public query ( string $sql ) : void
$sql string
Résultat void

showError() public méthode

Throw an exception upon a database error.
public showError ( string $code = null, array $info = null ) : void
$code string
$info array
Résultat void

version() public méthode

Return the database version.
public version ( ) : string
Résultat string

Property Details

$database protected_oe property

Database
protected string $database
Résultat string

$dbtype protected_oe property

PDO DB Type
protected string $dbtype
Résultat string

$dsn protected_oe property

PDO DSN
protected string $dsn
Résultat string

$placeholder protected_oe property

Statement placeholder
protected string $placeholder
Résultat string

$statement protected_oe property

Prepared statement
protected PDOStatement $statement
Résultat PDOStatement