简体   繁体   中英

apigility RPC how to get post

I have searched and I have found zero answers, so it must be something simple that eludes me.

When I create an RPC in apigility and the two .php files generate, how do I get the POST/GET data coming from a request so I can start working with it?

class StatusController extends AbstractActionController
{
    public function statusAction()
    {
        //how do I get the POST received?
    }
}
$this->getEvent()->getRouteMatch()->getParam('valueName');

Also be sure to add the valueName inside the field tab on the apigility service.

Or to retrieve them all at once.

$input = $this->getEvent()->getParam('ZF\ContentValidation\InputFilter');
$params = $input->getValues();

If you are cache your module class map and config be sure to delete them as well I have forgot that on more then one occasion.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM