OsfContainer.php
public static function getViewHelper($appName = null, bool $layout = false)
    {
        if ($appName === false) {
            $class = '\Osf\View\Helper';
            $instance = 'osf';
        } else {
            $appName = $appName === null ? Router::getDefaultControllerName(true) : $appName;
            $class = "\\App\\" . $appName . '\View\Helper';
            $instance = $appName;
        }
        $viewName = $layout ? 'layout' : 'view';
        $instance .= $layout ? '_l' : '_v';
        return self::buildObject($class, [$viewName]); //, $instance);
    }
public static function getViewHelper($appName = null, bool $layout = false)
    {
        if ($appName === false) {
            $class = '\Osf\View\Helper';
            $instance = 'osf';
        } else {
            $appName = $appName === null ? Router::getDefaultControllerName(true) : $appName;
            $class = "\\App\\" . $appName . '\View\Helper';
            $instance = $appName;
        }
        $viewName = $layout ? 'layout' : 'view';
        $instance .= $layout ? '_l' : '_v';
        return self::buildObject($class, [$viewName]); //, $instance);
    }
public static function getViewHelper ( $ appName = null , bool $ layout = false ) { if ( $ appName === false ) { $ class = '\Osf\View\Helper' ; $ instance = 'osf' ; } else { $ appName = $ appName === null ? Router :: getDefaultControllerName ( true ) : $ appName ; $ class = "\\App\\" . $ appName . '\View\Helper' ; $ instance = $ appName ; } $ viewName = $ layout ? 'layout' : 'view' ; $ instance .= $ layout ? '_l' : '_v' ; return self :: buildObject ( $ class , [ $ viewName ] ) ; //, $instance); }
Get a view helpers object with a context
@param string|null|false $appName if null : common app. if false : Osf view helper
@param bool $layout
@return \Osf\View\Helper
@task [HELPERS] simplifier
Get a view helpers object with a context