state = $state ?: new Registry; $this->db = $db ?: Factory::getDbo(); } /** * Get the database driver. * * @return JDatabaseDriver * * @since __DEPLOY_VERSION__ */ public function getDb() { return $this->db; } /** * Get the model state. * * @return Registry * * @since __DEPLOY_VERSION__ */ public function getState() { return $this->state; } /** * Set the database driver. * * @param JDatabaseDriver $db The database driver. * * @return void * * @since __DEPLOY_VERSION__ */ public function setDb(JDatabaseDriver $db) { $this->db = $db; } /** * Set the model state. * * @param Registry $state The state object. * * @return void * * @since __DEPLOY_VERSION__ */ public function setState(Registry $state) { $this->state = $state; } }