nestboxphp/

babbler

网站/博客功能的内容管理。

v0.0.6-alpha 2024-06-02 00:38 UTC

This package is auto-updated.

Last update: 2024-09-06 21:53:59 UTC


README

设置

用法

添加条目

add_entry(
    string $category,
    string $subCategory,
    string $title,
    string $content,
    string $author,
    string $created = null,
    string $published = "",
    bool   $isDraft = false,
    bool   $isHidden = false
): int|false

编辑条目

edit_entry(
    string|int $entry_id,
    string     $editor,
    string     $category = "",
    string     $subCategory = "",
    string     $title = "",
    string     $content = "",
    string     $published = "",
    bool       $isDraft = null,
    bool       $isHidden = null,
): int|false

删除条目

delete_entry(int $entry_id): bool

搜索条目

search_entries(string $words, string $category = "*", bool $strict = true, int $buffer = 100): array

搜索标题

search_title(string $title): array

搜索URL标题

search_url_title(string $title): array

获取条目表

fetch_entry_table(string $orderBy = "", string $sort = "", int $limit = 50, int $start = 0): array

获取条目

fetch_entry(int $entry_id): array

获取分类

fetch_categories(): array

获取子分类

fetch_sub_categories(string $category = ''): array

按分类获取条目

fetch_entries_by_category(string $category, string $subCategory = '', string $orderBy = 'created', string $sort = '', int $start = 0, int $limit = 10): array

按分类和标题获取条目

fetch_entry_by_category_and_title(string $category, string $title, string $subCategory = ''): array