_view = $view; } public function autoEscape() { if($this->_unescapedVars === null) { $vars = $this->_view->getVars(); $this->_unescapedVars = $vars; foreach($vars as $k => $v) $this->_view->$k = $this->_view->escape($v); } else { $this->_view->assign($this->_unescapedVars); $this->_unescapedVars = null; } } }