I'm trying to understand how Yii passes data from page to page. One thing that confused me was that the view pages associated with their respective controller could access the data sent to it through render without a post or get request. I.e.
//in the controller php file
$this->render('view',array('data1'=>$data1)))
//in the view php file
if (isset($data1)) { //do something amazing }
Now I realize it's because the view will have access to the members of the controller. But then, if that's the case, why would anyone bother putting a data array in the render function?
Consider another example provided on SO here.
What am I misunderstanding?