public function getUpdateData($core, $id) { if (in_array($core, $this->_cores)) { switch ($core) { case 'beowulf': $model = new Finds(); break; case 'beopeople': $model = new Peoples(); break; case 'beocontent': $model = new Content(); break; case 'beobiblio': $model = new Bibliography(); break; case 'beoimages': $model = new Slides(); break; case 'beopublications': $model = new Publications(); break; default: throw new Exception('Your core does not exist', 500); break; } $data = $model->getSolrData($id); // Zend_Debug::dump($data); // exit; $cleanData = $this->cleanData($data[0]); return $cleanData; } else { throw new Exception('That core does not exist', 500); } }