public function save() { if ($this->data_store) { if ($this->get_id()) { $this->data_store->update($this); } else { $this->data_store->create($this); } return $this->get_id(); } }