mirror of
https://github.com/suk-ws/ph-Bookshelf.git
synced 2024-12-05 09:26:52 +08:00
补充Page和Segment标签get方法,修改根标签为"%root",添加 ph-Bookshelf 元数据声明文件
This commit is contained in:
parent
5d25c10933
commit
dfa9e3f8a9
9
constant.php
Normal file
9
constant.php
Normal file
@ -0,0 +1,9 @@
|
||||
<?php
|
||||
|
||||
define("APP_NAME", "ph-Bookshelf");
|
||||
define("VERSION", "0.1");
|
||||
define("GITBOOK_VERSION", "3.2.3");
|
||||
|
||||
function get_frontpage_generate_version (): string {
|
||||
return APP_NAME." ".VERSION." with Gitbook ".GITBOOK_VERSION;
|
||||
}
|
@ -4,7 +4,7 @@ require_once "./src/Element/Book.php";
|
||||
|
||||
class BookCollection {
|
||||
|
||||
const ROOT = "::root";
|
||||
const ROOT = "%root";
|
||||
|
||||
private string $name;
|
||||
|
||||
|
@ -48,4 +48,19 @@ class Page {
|
||||
return $node;
|
||||
}
|
||||
|
||||
public function getId (): string {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName (): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Segment[]
|
||||
*/
|
||||
public function getSegments (): array {
|
||||
return $this->segues;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -32,4 +32,12 @@ class Segment {
|
||||
return new Segment($id, $name);
|
||||
}
|
||||
|
||||
public function getId (): string {
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName (): string {
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,7 @@ require_once "./src/Element/Link.php";
|
||||
|
||||
class LinkCollection {
|
||||
|
||||
const ROOT = "::root";
|
||||
const ROOT = "%root";
|
||||
|
||||
private string $name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user