Hi guys:
I am a newbie to the beautiful world of Phalcon
, and have got stuck for almost a long time. My question is as follows:
The following code snippet works like a charm:
public function someAction($age) {
// Do things with $age
}
However, I wonder how I can do it without using formal parameters but instead using $this->request->getPost('age') for example. When doing this, I get NULL ($_GET and $_POST are also NULL). Should I define a new Routing/Dispatching scheme for this to happen? Why $_GET (and/or $_POST) array is not populated correctly in this case and only contains:
array(1) { ["_url"]=> string(16) "/person/some/age/2" }
class PersonController extends Phalcon\Mvc\Controller { public function someAction() { // $this->request->getPost('age'), $this->request->getQuery('age'), $_GET, and $_POST are all NULL here } } Access URL I used to test: https://localhost/myapp/person/some/age/40