I want following urls to match one route:
/proxy/webservice1/method1/name
/proxy/webservice1/method2/param1/param2
/proxy/webservice2/method1/param1/param2/param3
So I defined route as follow :
# Webservice proxy Controller
$proxy = new MicroCollection();
$proxy->setHandler('ProxyController', true);
$proxy->setPrefix('/proxy');
$proxy->get('/{webservice}/:params', 'getAction');
$app->mount($proxy);
And controller :
class ProxyController extends Phalcon\Mvc\Controller
{
public function getAction($webservice){
var_dump($webservice);
$params = $this->dispatcher->getParams();
var_dump($params);
}
}
?>
I do have the $webservice
but how can I access the others? $params
is always empty.
Thanks for your comments.