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

In cakephp 2.1, what's the difference between $this->data and $this->request->data ?

+6
source share
1 answer

$this->data used up to and including 1.3

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

For backward compatibility, $this->data also supported.

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

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

+10
source

Source: https://habr.com/ru/post/913258/


All Articles