/** * Removes a script from composite * * @param RM_ReportScript_iScript $script * @return bool */ public function removeScript(RM_ReportScript_iScript $script) { foreach ($this->getScriptList() as $id => $item) { if ($item->id() == $script->id()) { unset($this->_stack[$id]); return TRUE; } } throw new RM_Base_Exception_BadUsage("Trying to remove an unexisting in composition script #" . $script->id() . " (`" . ($script->name ? 'unnamed' : $script->name) . "')"); }
public function deleteMap(RM_ReportScript_iScript $script) { $q = M('Db')->createQuery($this->_table['map'], 'delete')->where('script_id=?', $script->id()); $q->execute(); }