1
0
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:
A.C.Sukazyo Eyre 2021-03-23 00:35:14 +08:00
parent 5d25c10933
commit dfa9e3f8a9
Signed by: Eyre_S
GPG Key ID: EFB47D98FE082FAD
5 changed files with 34 additions and 2 deletions

9
constant.php Normal file
View 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;
}

View File

@ -4,7 +4,7 @@ require_once "./src/Element/Book.php";
class BookCollection {
const ROOT = "::root";
const ROOT = "%root";
private string $name;

View File

@ -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;
}
}

View File

@ -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;
}
}

View File

@ -4,7 +4,7 @@ require_once "./src/Element/Link.php";
class LinkCollection {
const ROOT = "::root";
const ROOT = "%root";
private string $name;