public function actionDoi() { $doi = Yii::app()->request->getParam('doi'); $context = Yii::app()->request->getParam('context'); $ref = WebAPI::searchCrossRefDOI($doi); if ($ref->type == 'journal-article' && $context == 'journal') { $ref->authors = $ref->unmakeAuthors(); $this->renderJSON((array) $ref); } else { if ($ref->type == 'proceedings-article' && $context == 'proceeding') { $ref->authors = $ref->unmakeAuthors(); $this->renderJSON((array) $ref); } else { throw new CHttpException(404, "Tidak ditemukan referensi dengan DOI tersebut."); } } }