I'm posting a specific value through a POST form to my CakePHP app. Within the AppController I handle this specific POST data and afterwards I unset $this->request->data, e.g.
if(!empty($this->request->data['Keyboard'])) {
$this->Session->write('Keyboard.active', $this->request->data['Keyboard']['active']);
unset($this->request->data);
}
Afterwards I want ALL request data to be unset (hence the $this->request->data). Within my child controllers I call parent::beforefilter(); as the first line of code in its respective beforeFilter function, making sure the beforeFilter of my appController is initiated. However, in my childController the following line of code will still evaluate to true:
if($this-request->is('post'))
How do I 'unset' the is('post') call? I've also tried $this->request->is('post') = false in the if-statement above, with no success however.