Ouzo\AutoloadNamespaces::getWidgetNamespace PHP 메소드

getWidgetNamespace() 공개 정적인 메소드

public static getWidgetNamespace ( )
    public static function getWidgetNamespace()
    {
        $controllerPath = Config::getValue('namespace', 'widget');
        return $controllerPath ? $controllerPath : "\\Application\\Widget\\";
    }

Usage Example

예제 #1
0
function renderWidget($widgetName)
{
    $className = ucfirst($widgetName);
    $viewWidget = new View($className . '/' . $widgetName);
    $classLoad = AutoloadNamespaces::getWidgetNamespace() . $className;
    $widget = new $classLoad($viewWidget);
    return $widget->render();
}