Add v0.0.3

This commit is contained in:
Sébastien Lucas 2012-05-28 07:06:12 +02:00
parent f460bd8731
commit 2308af6033
10 changed files with 146 additions and 24 deletions

View file

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