mvc:Dispatcher - add missing getActionName for backwards compatibility with Phalcon. closes https://github.com/opnsense/core/issues/7490

This commit is contained in:
Ad Schellevis 2024-05-28 15:09:37 +02:00
parent 2bf308f328
commit 1a282d1184

View File

@ -59,6 +59,16 @@ class Dispatcher
$this->parameters = $parameters;
}
/**
* XXX: rename to getMethodName when phalcon is removed and return plain $this->action,
* next cleanup ApiControllerBase.
* @return string action name
*/
public function getActionName()
{
return substr($this->action,0, strlen($this->action)-6);
}
/**
* Resolve controller class and inspect method to call, except when the target controller offers a __call
* hook in which case we expect the target to offer proper error handling