public function __construct(Database $db = null) { if (!$db) { $db = \Airship\get_database(); } $this->db = $db; }