Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

difference between $this->data and $this->request->data?

Tags:

cakephp-2.1

In cakephp 2.1 whats the difference between $this->data and $this->request->data?

like image 691
Ivan Santana Avatar asked Apr 15 '12 17:04

Ivan Santana


1 Answers

$this->data was used till cakephp 1.3

$this->request->data has replaced the $this->data array from cakephp 2.x onwards.

For backward compatibility $this->data is also still supported.

$this->request represents CakeRequest object and is accessible in Controller, Views and Helpers.

For more info : http://book.cakephp.org/2.0/en/controllers/request-response.html

like image 145
jdecode Avatar answered Sep 19 '22 08:09

jdecode