PHP Class Pop\Db\Adapter\AbstractAdapter

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

Protected Properties

Свойство Type Description
$connection resource Default database connection
$result resource Database results
$tables array Database tables

Méthodes publiques

Méthode Description
__construct ( array $options ) : AbstractAdapter Constructor
disconnect ( ) : void Disconnect from the database
escape ( string $value ) : string Return the escaped string value.
fetch ( ) : array Return the results array from the results resource.
getConnection ( ) : resource Get the connection resource
getResult ( ) : resource Get the result resource
getTables ( ) : array Get an array of the tables of the database.
hasResult ( ) : boolean Determine whether or not an result resource exists
isConnected ( ) : boolean Determine whether or not connected
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.
query ( string $sql ) : void Execute the SQL query and create a result resource, or display the SQL error.
showError ( ) : void Throw an exception upon a database error.
version ( ) : string Return the database version.

Méthodes protégées

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

Method Details

__construct() abstract public méthode

Instantiate the database adapter object.
abstract public __construct ( array $options ) : AbstractAdapter
$options array
Résultat AbstractAdapter

disconnect() abstract public méthode

Disconnect from the database
abstract public disconnect ( ) : void
Résultat void

escape() abstract public méthode

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

fetch() abstract public méthode

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

getConnection() public méthode

Get the connection resource
public getConnection ( ) : resource
Résultat resource

getResult() public méthode

Get the result resource
public getResult ( ) : resource
Résultat resource

getTables() public méthode

Get an array of the tables of the database.
public getTables ( ) : array
Résultat array

hasResult() public méthode

Determine whether or not an result resource exists
public hasResult ( ) : boolean
Résultat boolean

isConnected() public méthode

Determine whether or not connected
public isConnected ( ) : boolean
Résultat boolean

lastId() abstract public méthode

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

loadTables() abstract protected méthode

Load the tables of the database into an array.
abstract protected loadTables ( ) : array
Résultat array

numFields() abstract public méthode

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

numRows() abstract public méthode

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

query() abstract public méthode

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

showError() abstract public méthode

Throw an exception upon a database error.
abstract public showError ( ) : void
Résultat void

version() abstract public méthode

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

Property Details

$connection protected_oe property

Default database connection
protected resource $connection
Résultat resource

$result protected_oe property

Database results
protected resource $result
Résultat resource

$tables protected_oe property

Database tables
protected array $tables
Résultat array