Method | Description | |
---|---|---|
__construct ( ) | ||
changeFileExt ( $fileName, $ext = "html" ) | 修改后缀名 | |
getAllBlogs ( ) | 获取所有博客 | |
getAllCategorys ( ) | 获取所有分类 | |
getAllTags ( ) | 获取所有标签 | |
getAllYearMonths ( ) | 获取所有月份 | |
getBlogByCategory ( $categoryId ) | 按分类查找博客 | |
getBlogById ( $blogId ) | 根据Id获取博客 | |
getBlogByKeyword ( $keyword, $max = 50 ) | 按全文关键字查找博客 | |
getBlogByTag ( $tagId ) | 按标签查找博客 | |
getBlogByTitle ( $title, $max = 50 ) | 按标题关键字查找博客 | |
getBlogByYearMonthId ( $yearMonthId ) | 按月份查找博客 | |
getBlogsByPage ( $pageNo, $pageSize ) | 博客分页列表 | |
getBlogsPageByCategory ( $categoryId, $pageNo, $pageSize ) | 按分类获取分页列表 | |
getBlogsPageByTag ( $tagId, $pageNo, $pageSize ) | 按标签获取分页列表 | |
getBlogsPageByYearMonth ( $yearMonthId, $pageNo, $pageSize ) | 按月份获取分页列表 | |
getBlogsRecent ( $pageSize ) | 最新的博客 | |
getCategoryById ( $categoryId ) | 根据Id获取分类 | |
getCategoryTotalPages ( $categoryId, $pageSize ) | 获取某个分类的总页数 | |
getTagById ( $tagId ) | 根据Id获取标签 | |
getTagTotalPages ( $tagId, $pageSize ) | 获取某个标签的总页数 | |
getTotalPages ( $pageSize ) | 获取总页数 | |
getYearMonthById ( $yearMonthId ) | 根据Id获取月份 | |
getYearMonthTotalPages ( $yearMonthId, $pageSize ) | 获取某个月的总页数 | |
initAllBlogData ( $postPath, $enableCache = false ) | 加载所有的博客 |
Method | Description | |
---|---|---|
autoCheckBlogProps ( $blogProp ) | 自动获取未填写的属性 | |
checkFileExt ( $fileName ) | 检查文件名是否是markdown文件 | |
checkObjInArr ( $tagObj, $type ) | ||
cleanKeywords2Arr ( $keywordsStr ) | 获取标签,分类数组 | |
converStrArr ( $tags, $type ) | 将tags, category字符串转成数组 | |
gbReadCache ( $key ) | 读缓存 | |
gbWriteCache ( $key, $objdata ) | 写缓存 | |
globalDataCacheRead ( ) | 从文件缓存中读取数据 | |
globalDataCacheWrite ( ) | 缓存全局数据 | |
parseMarkdown ( $text ) | 解析markdown文件内容为html文本 | |
readAllPostInfo ( $mdfiles, $postPath ) | 读取所有博客的信息 | |
readPostBaseInfo ( $serverPath ) | 读取博客的基本信息 | |
sortBlogs ( $blogArray, $sortKey ) | 对所有博客排序 | |
sortYearMonths ( ) | 对归档日期进行排序 | |
urlencodeFileName ( $fileName ) | 对URL中的中文编码 |
public getBlogsPageByCategory ( $categoryId, $pageNo, $pageSize ) |
public getBlogsPageByYearMonth ( $yearMonthId, $pageNo, $pageSize ) |
public getCategoryTotalPages ( $categoryId, $pageSize ) |
public getYearMonthTotalPages ( $yearMonthId, $pageSize ) |