mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 20:36:38 -04:00
Add more type hints and work on some code formatting
This commit is contained in:
parent
06b82cdaaa
commit
c3c588cc1b
35 changed files with 343 additions and 167 deletions
|
@ -1,4 +1,13 @@
|
|||
<?
|
||||
/**
|
||||
* @var string $id
|
||||
* @var string $url
|
||||
* @var string $parentUrl
|
||||
* @var string $title
|
||||
* @var ?string $subtitle
|
||||
* @var DateTimeImmutable $updated
|
||||
* @var array<OpdsNavigationEntry> $entries
|
||||
*/
|
||||
|
||||
$subtitle = $subtitle ?? null;
|
||||
|
||||
|
@ -13,9 +22,13 @@ print("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n");
|
|||
<link href="<?= SITE_URL ?>/feeds/opds" rel="start" type="application/atom+xml;profile=opds-catalog;kind=navigation; charset=utf-8"/>
|
||||
<link href="<?= SITE_URL ?>/feeds/opds/all" rel="http://opds-spec.org/crawlable" type="application/atom+xml;profile=opds-catalog;kind=acquisition; charset=utf-8"/>
|
||||
<link href="<?= SITE_URL ?>/ebooks/opensearch" rel="search" type="application/opensearchdescription+xml; charset=utf-8"/>
|
||||
<? if($parentUrl !== null){ ?><link href="<?= SITE_URL ?><?= Formatter::EscapeXml($parentUrl) ?>" rel="up" type="application/atom+xml;profile=opds-catalog;kind=navigation; charset=utf-8"/><? } ?>
|
||||
<? if($parentUrl !== null){ ?>
|
||||
<link href="<?= SITE_URL ?><?= Formatter::EscapeXml($parentUrl) ?>" rel="up" type="application/atom+xml;profile=opds-catalog;kind=navigation; charset=utf-8"/>
|
||||
<? } ?>
|
||||
<title><?= Formatter::EscapeXml($title) ?></title>
|
||||
<? if($subtitle !== null){ ?><subtitle><?= Formatter::EscapeXml($subtitle) ?></subtitle><? } ?>
|
||||
<? if($subtitle !== null){ ?>
|
||||
<subtitle><?= Formatter::EscapeXml($subtitle) ?></subtitle>
|
||||
<? } ?>
|
||||
<icon><?= SITE_URL ?>/images/logo.png</icon>
|
||||
<updated><?= $updated->format('Y-m-d\TH:i:s\Z') ?></updated>
|
||||
<author>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue