PHP Class Pop\Db\Adapter\AbstractAdapter

Author: Nick Sagona, III ([email protected])
Datei anzeigen Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$connection resource Default database connection
$result resource Database results
$tables array Database tables

Public Methods

Method 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.

Protected Methods

Method Description
loadTables ( ) : array Load the tables of the database into an array.

Method Details

__construct() abstract public method

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

disconnect() abstract public method

Disconnect from the database
abstract public disconnect ( ) : void
return void

escape() abstract public method

Return the escaped string value.
abstract public escape ( string $value ) : string
$value string
return string

fetch() abstract public method

Return the results array from the results resource.
abstract public fetch ( ) : array
return array

getConnection() public method

Get the connection resource
public getConnection ( ) : resource
return resource

getResult() public method

Get the result resource
public getResult ( ) : resource
return resource

getTables() public method

Get an array of the tables of the database.
public getTables ( ) : array
return array

hasResult() public method

Determine whether or not an result resource exists
public hasResult ( ) : boolean
return boolean

isConnected() public method

Determine whether or not connected
public isConnected ( ) : boolean
return boolean

lastId() abstract public method

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

loadTables() abstract protected method

Load the tables of the database into an array.
abstract protected loadTables ( ) : array
return array

numFields() abstract public method

Return the number of fields in the result.
abstract public numFields ( ) : integer
return integer

numRows() abstract public method

Return the number of rows in the result.
abstract public numRows ( ) : integer
return integer

query() abstract public method

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

showError() abstract public method

Throw an exception upon a database error.
abstract public showError ( ) : void
return void

version() abstract public method

Return the database version.
abstract public version ( ) : string
return string

Property Details

$connection protected_oe property

Default database connection
protected resource $connection
return resource

$result protected_oe property

Database results
protected resource $result
return resource

$tables protected_oe property

Database tables
protected array $tables
return array