src/core/ViewFactory.php
public static function createView(
        string $actionName,
        ?string $ctrlName = null
    ): ?View {
        $viewsRoot = AppHelper::getInstance()->getComponentRoot('views');
        $addPath   = '';
        if (!empty($ctrlName)) {
            $addPath .= \DIRECTORY_SEPARATOR.strtolower($ctrlName);
        }
        $viewFile = $viewsRoot.$addPath.\DIRECTORY_SEPARATOR
            .strtolower($actionName).'.php';
        if (is_readable($viewFile)) {
            return new View($viewFile);
        }
        return null;
    }
public static function createView(
        string $actionName,
        ?string $ctrlName = null
    ): ?View {
        $viewsRoot = AppHelper::getInstance()->getComponentRoot('views');
        $addPath   = '';
        if (!empty($ctrlName)) {
            $addPath .= \DIRECTORY_SEPARATOR.strtolower($ctrlName);
        }
        $viewFile = $viewsRoot.$addPath.\DIRECTORY_SEPARATOR
            .strtolower($actionName).'.php';
        if (is_readable($viewFile)) {
            return new View($viewFile);
        }
        return null;
    }
The method creates a view object assosiated 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 $actionName The action name.
@param string $ctrlName|null The controller name (as optional)
@return \nadir2\core\View|null It returns null if view file isn't readable.