Add v0.0.3
This commit is contained in:
parent
f460bd8731
commit
2308af6033
10 changed files with 146 additions and 24 deletions
13
base.php
13
base.php
|
@ -26,6 +26,10 @@ class Link
|
|||
$this->rel = $prel;
|
||||
$this->title = $ptitle;
|
||||
}
|
||||
|
||||
public function hrefXhtml () {
|
||||
return str_replace ("&", "&", $this->href);
|
||||
}
|
||||
}
|
||||
|
||||
class LinkNavigation extends Link
|
||||
|
@ -34,6 +38,7 @@ class LinkNavigation extends Link
|
|||
|
||||
public function __construct($phref, $prel = NULL, $ptitle = NULL) {
|
||||
parent::__construct ($phref, self::OPDS_NAVIGATION_TYPE, $prel, $ptitle);
|
||||
$this->href = $_SERVER["SCRIPT_NAME"] . $this->href;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,6 +81,14 @@ class EntryBook extends Entry
|
|||
$this->book = $pbook;
|
||||
$this->localUpdated = $pbook->timestamp;
|
||||
}
|
||||
|
||||
public function getCoverThumbnail () {
|
||||
foreach ($this->linkArray as $link) {
|
||||
if ($link->rel == "http://opds-spec.org/image/thumbnail")
|
||||
return $link->hrefXhtml ();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
class Page
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue