public static function getView($view, $vars = array(), $return = false) { $apps = explode('\\', get_called_class()); $apps = array_splice($apps, 1, -2); $path = Tools::pathfor($apps, 'views' . DIRECTORY_SEPARATOR . str_replace('..', '.', $view) . '.php'); ob_start(); include $path; $output = ob_get_clean(); if ($return) { return $output; } echo $output; }