Array $ALLOWED_CALLS
contains a function name and required parameters. I'd like to filter $_REQUEST
array obtaining a $params
array with only required paramets in it. How to?
$call = 'translate';
$ALLOWED_CALLS = array(
'getLanguages' => array(),
'detect' => array('text'),
'translateFrom' => array('text', 'from', 'to'),
'translate' => array('text', 'to'),
);
$params = array(); // Should contain $_REQUEST['text'] and $_REQUEST['to']