public static function getWidgetNamespace()
{
$controllerPath = Config::getValue('namespace', 'widget');
return $controllerPath ? $controllerPath : "\\Application\\Widget\\";
}
function renderWidget($widgetName) { $className = ucfirst($widgetName); $viewWidget = new View($className . '/' . $widgetName); $classLoad = AutoloadNamespaces::getWidgetNamespace() . $className; $widget = new $classLoad($viewWidget); return $widget->render(); }