public function __actionEdit() { $synonym = $_POST['synonym']; // remove existing instance of hash if ($synonym['hash'] != '') { unset($this->_synonyms[$synonym['hash']]); } $this->_synonyms[sha1($synonym['word'])] = array('word' => $synonym['word'], 'synonyms' => $synonym['synonyms']); SearchIndex::saveSynonyms($this->_synonyms); redirect("{$this->_uri}/synonyms/"); }