public function expunge() { if (!$this->id || !$this->ascii_id) { throw new Exception('cannot delete unspecified type'); } $ait = new Dase_DBO_AttributeItemType($this->db); $ait->item_type_id = $this->id; foreach ($ait->find() as $doomed) { Dase_Log::info(LOG_FILE, 'deleted attribute_item_type ' . $doomed->id); $doomed->delete(); } $this->delete(); }
function expunge() { $dv = new Dase_DBO_DefinedValue($this->db); $dv->attribute_id = $this->id; foreach ($dv->find() as $doomed) { $doomed->delete(); } $ait = new Dase_DBO_AttributeItemType($this->db); $ait->attribute_id = $this->id; foreach ($ait->find() as $doomed) { $doomed->delete(); } $this->delete(); }