public static function createView($sCtrlName = null, $sActionName)
    {
        $sViewsRoot = AppHelper::getInstance()->getComponentRoot('views');
        $sAddPath   = '';
        if (!empty($sCtrlName)) {
            $sAddPath .= DIRECTORY_SEPARATOR.strtolower($sCtrlName);
        }
        $sViewFile = $sViewsRoot.$sAddPath.DIRECTORY_SEPARATOR
            .strtolower($sActionName).'.php';
        if (is_readable($sViewFile)) {
            return new View($sViewFile);
        }
        return null;
    }
public static function createView($sCtrlName = null, $sActionName)
    {
        $sViewsRoot = AppHelper::getInstance()->getComponentRoot('views');
        $sAddPath   = '';
        if (!empty($sCtrlName)) {
            $sAddPath .= DIRECTORY_SEPARATOR.strtolower($sCtrlName);
        }
        $sViewFile = $sViewsRoot.$sAddPath.DIRECTORY_SEPARATOR
            .strtolower($sActionName).'.php';
        if (is_readable($sViewFile)) {
            return new View($sViewFile);
        }
        return null;
    }
public static function createView ( $ sCtrlName = null , $ sActionName ) { $ sViewsRoot = AppHelper :: getInstance ( ) -> getComponentRoot ( 'views' ) ; $ sAddPath = '' ; if ( ! empty ( $ sCtrlName ) ) { $ sAddPath .= DIRECTORY_SEPARATOR . strtolower ( $ sCtrlName ) ; } $ sViewFile = $ sViewsRoot . $ sAddPath . DIRECTORY_SEPARATOR . strtolower ( $ sActionName ) . '.php' ; if ( is_readable ( $ sViewFile ) ) { return new View ( $ sViewFile ) ; } return null ; }
The method creates a view object assigned with the specific controller and
action in it. If controller name is empty it means a markup file determined
only with action name. It doesn't physically consist into the direcory named
as controller, it's in the root of the view directory.
@param string $sCtrlName|null The controller name (as optional)
@param string $sActionName The action name.
@return \nadir\core\View|null It returns null if view file isn't readable.
The method creates a view object assigned with the specific controller and action in it . If controller name is empty it means a markup file determined only with action name . It doesn t physically consist into the direcory named as controller it s in the root of the view directory .