public function db() { if ($this && $this->tipsy() && $this->tipsy()->db()) { return $this->tipsy()->db(); } else { return Tipsy::db(); } }