/** * Drop a table specified in class map if exists * @param epClassMap $cm The class map * @return bool */ public function drop($cm) { // check if class is abstract if ($cm->isAbstract()) { // if so, no need to actually create return true; } // preapre sql statement $sql = epObj2Sql::sqlDrop($this, $cm); if (!$sql) { return false; } $this->db->clearTableExists($cm->getTable()); // execute sql // if the table doesn't exist, it will throw an // exception which is ok try { $result = $r = $this->_execute($sql); } catch (Exception $e) { return true; } return $result; }