static PMO_Dbms factory(
[
$object = NULL])
|
|
returns a reference to the PMO_Dbms object If it does not already exists a new object is created and retained for future use
if an PDO object is provided as parameter, it will be used and will replace any existing instance.
This uses the singleton design pattern. To get the object, use code such as this:
// either returns an existing instance or creates a new one and returns it
// use an already defined PDO instance
$pdo = new PDO("sqlite:/hoem/user/db/mydatabase.db");
$db = PMO_MyBbms::factory($pdo);
Tags:
Implementation of:
- PMO_Dbms::factory()
- The implementatio must create a PMO_MyDbms object or if it already exists, return a reference of this object instance
Parameters: