protected function PartialView($viewName, $partialViewVars = null) { $partialViewName = PartialViewPath($this->Core, $viewName); if (!file_exists($partialViewName)) { trigger_error('Partial view missing ' . $partialViewName, E_USER_ERROR); } if ($partialViewVars != null) { if (is_array($partialViewVars)) { foreach ($partialViewVars as $key => $var) { ${$key} = $var; } } else { trigger_error('$PartialViewVars is not an array', E_USER_ERROR); } } include $partialViewName; }
protected function PartialView($viewName, $partialViewVars = null) { $partialViewName = PartialViewPath($this->Core, $viewName); if (!file_exists($partialViewName)) { die('Partial view missing ' . $partialViewName); } $this->BeforeRender(); if ($partialViewVars != null) { if (is_array($partialViewVars)) { foreach ($partialViewVars as $key => $var) { ${$key} = $var; } } else { die('$PartialViewVars is not an array'); } } include $partialViewName; }