PHP Class Pop\Db\Db

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

Protected Properties

Свойство Type Description
$adapter mixed Default database adapter object
$isPdo boolean Flag for a PDO adapter

Méthodes publiques

Méthode Description
__construct ( string $type, array $options, string $prefix = 'Pop\Db\Adapter\' ) : Db Constructor
adapter ( ) : mixed Get the database adapter.
factory ( string $type, array $options, string $prefix = 'Pop\Db\Adapter\' ) : Db Determine whether or not an instance of the DB object exists already, and instantiate the object if it doesn't exist.
getAdapterType ( ) : string Get the database adapter type.
isPdo ( ) : boolean Get the PDO flag

Method Details

__construct() public méthode

Instantiate the database connection object.
public __construct ( string $type, array $options, string $prefix = 'Pop\Db\Adapter\' ) : Db
$type string
$options array
$prefix string
Résultat Db

adapter() public méthode

Get the database adapter.
public adapter ( ) : mixed
Résultat mixed

factory() public static méthode

Determine whether or not an instance of the DB object exists already, and instantiate the object if it doesn't exist.
public static factory ( string $type, array $options, string $prefix = 'Pop\Db\Adapter\' ) : Db
$type string
$options array
$prefix string
Résultat Db

getAdapterType() public méthode

Get the database adapter type.
public getAdapterType ( ) : string
Résultat string

isPdo() public méthode

Get the PDO flag
public isPdo ( ) : boolean
Résultat boolean

Property Details

$adapter protected_oe property

Default database adapter object
protected mixed $adapter
Résultat mixed

$isPdo protected_oe property

Flag for a PDO adapter
protected bool $isPdo
Résultat boolean