private static function getViewPathFromBasePath($routeData, $basePath) { $lowControllerName = StringUtil::startWithLowerCase($routeData->getControllerName()); $lowActionName = StringUtil::startWithLowerCase($routeData->getActionName()); $filePathWithActionName = $basePath . $lowControllerName . "/" . $lowActionName . "." . self::$VIEW_FILE_EXTENSION; if (file_exists($filePathWithActionName)) { return $filePathWithActionName; } $filePathWithoutActionName = $basePath . $lowControllerName . "." . self::$VIEW_FILE_EXTENSION; if (file_exists($filePathWithoutActionName)) { return $filePathWithoutActionName; } return null; }