public function romanmintrulerAction() { if ($this->_getParam('term', false)) { $mints = new Mints(); $mint_options = $mints->getRomanMintRuler($this->_getParam('term')); if ($mint_options) { echo Zend_Json::encode($mint_options); } else { $data = array(array('id' => NULL, 'term' => 'No options available')); echo Zend_Json::encode($data); } } else { $data = array(array('id' => NULL, 'term' => 'No ruler specified')); echo Zend_Json::encode($data); } }