public function persistToDatabase() { $this->writeXmlParam('state', json_encode($this->getJson()), true); $this->cronk->cronk_xml = $this->dom->saveXML(); $return = $this->cronk->state() === Doctrine_Record::STATE_CLEAN ? false : true; $this->cronk->save(); return $return; }