Pop\Db\Sql::getDb PHP Method

getDb() public method

Get the current database object.
public getDb ( ) : Db
return Db
    public function getDb()
    {
        return $this->db;
    }

Usage Example

Exemplo n.º 1
0
 public function testSetAndGetDb()
 {
     $db = Db::factory('Sqlite', array('database' => __DIR__ . '/../tmp/test.sqlite'));
     $s = new Sql($db, 'users');
     $s->setDb($db);
     $this->assertInstanceOf('Pop\\Db\\Db', $s->getDb());
     $this->assertInstanceOf('Pop\\Db\\Adapter\\Sqlite', $s->adapter());
 }
All Usage Examples Of Pop\Db\Sql::getDb