public function getLastInsertID($sequenceName = '') { if ($this->db->isActive) { return $this->db->pdo->lastInsertId($sequenceName === '' ? null : $this->quoteTableName($sequenceName)); } else { throw new InvalidCallException('DB Connection is not active.'); } }