yii\web\ViewAction::resolveViewName PHP 메소드

resolveViewName() 보호된 메소드

Resolves the view name currently being requested.
protected resolveViewName ( ) : string
리턴 string the resolved view name
    protected function resolveViewName()
    {
        $viewName = Yii::$app->request->get($this->viewParam, $this->defaultView);
        if (!is_string($viewName) || !preg_match('~^\\w(?:(?!\\/\\.{0,2}\\/)[\\w\\/\\-\\.])*$~', $viewName)) {
            if (YII_DEBUG) {
                throw new NotFoundHttpException("The requested view \"{$viewName}\" must start with a word character, must not contain /../ or /./, can contain only word characters, forward slashes, dots and dashes.");
            } else {
                throw new NotFoundHttpException(Yii::t('yii', 'The requested view "{name}" was not found.', ['name' => $viewName]));
            }
        }
        return empty($this->viewPrefix) ? $viewName : $this->viewPrefix . '/' . $viewName;
    }