php - cakephp to know the all set variable in controller itself -
can possible track set variable $this->set('variable_name', 'some_value')
in controller's method itself. have method call several other method , each sub method set value view. unable track if same key set twice in main method or not.
example
function beforefilter() { $this->set('key1', 'viable value'); } function reqmethod() { $this->extendmethod1(); $this->extendmethod2(); $this->extendmethod3(); $this->extendmethod4(); $this->extendmethod5(); $this->extendmethod6(); // want track set variable (key) here. } private function extendmethod1() { $this->set('key1', 'unknow value'); }
here may possible key1 (by mistake) can set method. appreciated.
controller::set() adds value(s) 'viewvars' property, debug variables, you'll have this:
debug($this->viewvars);
you have discovered yourself, looking inside source?
Comments
Post a Comment