In Joomla! 2.5.x I could simply run JRequest::get('post');
but seeing as JRequest
is deprecated in Joomla! 3.x I should use JInput
.
At them moment this is the code I'm using to get the entire $_POST
:
$app = JFactory::getApplication();
$postData = $app->input->getArray(array_flip(array_keys($_POST)));
But this seems rather cumbersome and I run into issues if used in conjunction with $app->input->set();
I would think there would be a better way?
When searching for this before I've found people saying you can simply run
$app = JFactory::getApplication();
$postData = $app->input->post;
But when I tried this out I simply got an instance of the JInput
object.