protected function doDelete(\Owl\DataMapper\Data $data, \Owl\Service $service = null, $collection = null) { $service = $service ?: $this->getService(); $collection = $collection ?: $this->getCollection(); list($where, $params) = $this->whereID($service, $data->id(true)); return $service->delete($collection, $where, $params); }
protected function doDelete(\Owl\DataMapper\Data $data, Service $service = null, $collection = null) { $service = $service ?: $this->getService(); $collection = $collection ?: $this->getCollection(); return $service->delete($collection, $data->id()); }
/** * delete cache before refresh data * * @param \Owl\DataMapper\Data $data * @return \Owl\DataMapper\Data */ public function refresh(\Owl\DataMapper\Data $data) { $this->deleteCache($data->id()); return parent::refresh($data); }