Hi there,
I wrote a test function like this.
public function testAction() {
logger("HAS BEEN CALLED", 0);
logger($this->request->isGet() ? "This is GET" : "", 0);
if($this->request->isPost() ) {
logger("This is POST", 0);
}
$this->view->start();
$this->view->render($this->theme, "order", "test");
// $this->view->pick($this->theme."/"."order/test");
$this->view->finish();
return;
}
Check on log file:
[INFO][2020/08/31 03:28:00 PM] test.local: HAS BEEN CALLED
[INFO][2020/08/31 03:28:00 PM] test.local: This is GET
[INFO][2020/08/31 03:28:00 PM] test.local: HAS BEEN CALLED
[INFO][2020/08/31 03:28:00 PM] test.local: This is GET
[INFO][2020/08/31 03:28:06 PM] test.local: HAS BEEN CALLED
[INFO][2020/08/31 03:28:06 PM] test.local: This is GET
[INFO][2020/08/31 03:28:07 PM] test.local: HAS BEEN CALLED
[INFO][2020/08/31 03:28:07 PM] test.local: This is GET
As you can see, when I access to /test, somehow the function testAction is called twice.
Is it normal in Phalcon or Am I wrong something?