Skip to content
Snippets Groups Projects
Commit 2dee4c44 authored by pbarroca's avatar pbarroca
Browse files

Gestion du routage verb => action

parent a017beaf
Branches
Tags
No related merge requests found
......@@ -31,18 +31,15 @@ class OaiController extends Zend_Controller_Action {
$this->getResponse()->setHeader('Content-Type', 'text/xml;charset=utf-8');
$this->getHelper('ViewRenderer')->setNoRender();
if ('ListIdentifiers' == $this->_getParam('verb')) {
$this->_forward('list-identifiers', null, null,
$this->_request->getParams() + array('format' => 'xml'));
return;
}
$verbsMapping = array('ListIdentifiers' => 'list-identifiers',
'Identify' => 'identify');
if ('Identify' == $this->_getParam('verb')) {
$this->_forward('identify', null, null,
if (array_key_exists($this->_getParam('verb'), $verbsMapping)) {
$this->_forward($verbsMapping[$this->_getParam('verb')], null, null,
$this->_request->getParams() + array('format' => 'xml'));
return;
}
$request = Class_WebService_OAI_ResponseFactory::verbAndBaseUrl($this->_getParam('verb'),
$this->buildBaseUrl());
$this->_response->setBody($request->xml($this->_request->getParams()));
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment