mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2025-02-24 23:20:52 +08:00
- 基础的请求链接解析实现 - 当前链接解析将第一个参数(首目录)视为 bookId,剩余视为 pageId - 即不支持 bookId中包含“/” - 同时实现了 books 的 active 判定 - 实现了通过 ID 进行查询容器中的 Book 或者 Page 的功能 - 实现了通过 Book对象 获取对应的 BookContented 对象 - 实现了 BookContented 的目录表生成 - 同时也有 active 判定
21 lines
457 B
PHP
21 lines
457 B
PHP
<?php
|
|
|
|
require_once "./src/Element/BookContent/BookContented.php";
|
|
require_once "./src/Element/BookContent/Page.php";
|
|
|
|
class PageMeta {
|
|
|
|
public static BookContented $book;
|
|
public static Page $page;
|
|
public static bool $isMainPage = false;
|
|
|
|
public static function getPageTitle (): string {
|
|
return self::$page->getName()." - ".self::$book->getName();
|
|
}
|
|
|
|
public static function getDescription (): string {
|
|
return ""; // todo wip description
|
|
}
|
|
|
|
}
|