createFromXml($xml, $auth); } catch (Exception $e) { throw new Exception("Could not create WMC from XML."); } return $wmc; } public function createFromDb ($id) { try { $wmc = new wmc(); $res = $wmc->createFromDb($id); if ($res === false) { throw new Exception("Could not create WMC from DB."); } } catch (Exception $e) { throw new Exception("Could not create WMC from DB."); } return $wmc; } } ?>