DbObject: add hasConnection() helper method

This commit is contained in:
Thomas Gelf 2015-07-27 23:24:50 +02:00
parent f300bdca89
commit d522cb8d2b
1 changed files with 6 additions and 0 deletions

View File

@ -472,10 +472,16 @@ abstract class DbObject
return $this->db;
}
public function hasConnection()
{
return $this->connection !== null;
}
public function getConnection()
{
return $this->connection;
}
/**
* Lädt einen Datensatz aus der Datenbank und setzt die entsprechenden
* Eigenschaften dieses Objekts