public function update($templateId, $privacy = 'public', $webhooks = 'yes') { $templateDb = new Shared_Db_Table_Template(); try { $templateDb->getAdapter()->beginTransaction(); $templateDb->update(array('privacy' => (string) $privacy, 'web_hooks' => (string) $webhooks), $templateDb->getAdapter()->quoteInto('id = ?', $templateId)); $templateDb->getAdapter()->commit(); } catch (Exception $e) { $templateDb->getAdapter()->rollBack(); throw $e; } return $this; }